• PCMod 2 - Release Inside
    669 replies, posted
  • I get an error on my server when someone pulls out the speaker tool. My server prints this: "KeyValues error: RecrusiveloadFromBuffer: got EOF instead of keyname in file models.Chipsticks_PCMod_Models/Speakers/standard mdlkeyvalue, (*prop_data*), and ends up crashing it. Anyone got any advice?
  • Avatar of Chipstik
  • :O My model! My bad. I don't know why it's giving that error. Are you running the latest version?
  • [QUOTE=Chipstik;13759167]:O My model! My bad. I don't know why it's giving that error. Are you running the latest version?[/QUOTE] Yea I just downloaded. Come to think of it... I was getting the same error with the other speaker model on the last version too.
  • Avatar of Choppie
  • [QUOTE=Valeour;13757013]Wow... I go at around lunch and get back around 9, and the whole page gets filled... Sorry GMT, I want your brain too. x3.[/QUOTE] Valeour, you're turning into some kind of...ZOMBIE! Look out thomas, he's coming for you next! xD
  • Avatar of mbainrot
  • Thanks for the SVN :), I'll continue testing and pushing it to the limits so we can diffinitly say [i]x[/i] number of [i](insert device name here)[/i] will run fine Also I tried making my own router (48 porter :), seems like the network protocol doesn't like 48 ports :|, it also doesn't like for loops ( i was looking at source coding thinking... wtf? why not use a foor loop, now I know why xD) Anyways keep up the brilliant work, you've done what many fail to do, that is, create good addons, which are popular and well supported :)
  • Avatar of implaying8
  • Nice. You should add a "Switch"! Not the light switch type, but the network type (router ports-ports=switch) Basically, it's just a splitter.
  • Avatar of leader1337
  • Heres a bug. I'm pretty sure when i have this on my server you can move the doors arouns with the phys gun. Sorry jsut tested and that wasn't it. If you have any help then please tell me.
  • Avatar of Coona
  • For all the times I've wanted to say it: [img]http://www.funny-city.com/photos/niggers.jpg[/img]
  • Avatar of mbainrot
  • @implaying8 +agree :), add fibre ports as to speed up data transit Latest SVN network config as follows PC --- (network) -- router -- (fibre) -- backbone -- (fibre) -- router -- (network) -- PC Neither PC can ping nor see each other :| Config: PC -- (network) -- router -- (fibre) -- router -- (network) -- PC works fine :) Cheers :D
  • Avatar of Achilles123
  • I'm sorry for this, I'm being really retarded and I know it. Can someone quickly explain how I would have to set up computers to have them chat? And also what the hell a "Server" Computer Tower is actually used for? I'm incredibly confused.
  • [QUOTE=jiggu2;13755877]Also how do you connect speakers? It keep saying No ports.[/QUOTE] Tower->Splitter->Speaker [QUOTE=mbainrot;13762734]@implaying8 +agree :), add fibre ports as to speed up data transit Latest SVN network config as follows PC --- (network) -- router -- (fibre) -- backbone -- (fibre) -- router -- (network) -- PC Neither PC can ping nor see each other :| Config: PC -- (network) -- router -- (fibre) -- router -- (network) -- PC works fine :) Cheers :D[/QUOTE] We are aware of this. for now you can use Wireless to connect more then 2 routers [QUOTE=Achilles123;13764218]And also what the hell a "Server" Computer Tower is actually used for? I'm incredibly confused.[/QUOTE]A server is just that, a server. It hosts the Chat Server (PCMod1's gchat) and a Printer Sharing server which may not be completed yet [QUOTE=mbainrot;13761954]Thanks for the SVN :), I'll continue testing and pushing it to the limits so we can diffinitly say [i]x[/i] number of [i](insert device name here)[/i] will run fine Also I tried making my own router (48 porter :), seems like the network protocol doesn't like 48 ports :|, it also doesn't like for loops ( i was looking at source coding thinking... wtf? why not use a foor loop, now I know why xD) Anyways keep up the brilliant work, you've done what many fail to do, that is, create good addons, which are popular and well supported :)[/QUOTE] The network protocol is specifically programmed to only work with our routers by name and by port connections. You need to edit the router driver and serverside networking stuff to add support for your router
  • Avatar of mbainrot
  • [QUOTE=gmt2001;13765402] ... We are aware of this. for now you can use Wireless to connect more then 2 routers .. [/QUOTE] ok sry about that, i thought the awareness of router issues was the IP one not the unable to route one, ta for that edit: I'll be putting up source code for a KVM switch :D soonish edit2: here it is, it kinda works (like it cab switch between screens, but won't detect changes in the screen, (e.g. server control panel, sometimes it won't update the object, but it usually does update whats running (like whether its notepad or my computer or what ever) note the comments for the KVM are wrong, it only switches video at this time :) although aslong as the server/desktop has a keyboard it will work anyway) [i]lua/entities/pcmod_kvm/shared.lua[/i] [code] // --------------------------------------------------------------------------------------------------------- // pcmod_kvm // Keyboard Video and Mouse Switch :) - For Servers and PCs // --------------------------------------------------------------------------------------------------------- ENT.Type = "anim" ENT.Base = "pcmod_base" ENT.PrintName = "KVM Switch" ENT.Class = "pcmod_kvm" ENT.ItemModel = "models/props_lab/reciever01b.mdl" ENT.IsScreen = false ENT.AlwaysOn = true ENT.KVMPort = 1 // Default to PC 1 ENT.Ply = nil ENT.Screen1 = nil ENT.Screen2 = nil ENT.Screen3 = nil ENT.Screen4 = nil if (SERVER) then AddCSLuaFile( "shared.lua" ) end if not (WireAddon == nil) then ENT.WireDebugName = "PCMod KVM Switch" end function ENT:Setup( setupdata ) if (!setupdata) then setupdata = {} end -- Ensure we have setup data local dt = self:Data() -- Get our data // Create our ports local pts = {} table.insert( pts, self:CreatePort( "vga" ) ) // SCREEN // DESKTOPS table.insert( pts, self:CreatePort( "vga" ) ) table.insert( pts, self:CreatePort( "vga" ) ) table.insert( pts, self:CreatePort( "vga" ) ) table.insert( pts, self:CreatePort( "vga" ) ) dt.Ports = pts // WIREMOD if not (WireAddon == nil) then self.Inputs = Wire_CreateInputs(self.Entity, { "Port" }) end // Update us self:UpdateData( dt ) end function ENT:TriggerInput(iname, value) if (iname == "Port" and self.KVMPort != value) then self.KVMPort = value self:ProcessWireTrig(value) end end function ENT:ProcessWireTrig(value) if value == 1 then local res = self:PushData( self:Ports()[ 1 ], { "display", self.Screen1 } ) end if value == 2 then local res = self:PushData( self:Ports()[ 1 ], { "display",self.Screen2 } ) end if value == 3 then local res = self:PushData( self:Ports()[ 1 ], { "display", self.Screen3 } ) end if value == 4 then local res = self:PushData( self:Ports()[ 1 ], { "display", self.Screen4 } ) end end function ENT:DataRecieved( port, data ) local pt = self:Ports()[ port ] if (!pt) then return end if (pt.Type == "vga") then PCMod.Msg( "KVM recieved message!", true ) if(port == 1) then // Data from our monitor if(data[1] == "player_input") then // PLayer input, 3 argumetns local res = self:PushData( self:Ports()[ self.KVMPort + 1 ], { data[1], data[2],data[3] } ) end if(data[1] == "player_locked") then // player locked (use), 2 args self.Ply = data[1] local res = self:PushData( self:Ports()[ self.KVMPort + 1 ], { data[1], data[2] } ) end end if(port == (self.KVMPort + 1)) then // Data from a tower local res = self:PushData( self:Ports()[ 1 ], { data[1], data[2]} ) end // Deal with data received while on another screen if(port > 1 and data[1] == "display") then // ignore screen if(port == 2) then // screen 1 self.Screen1 = data[2] PCMod.Msg( "KVM recieved message from PC 1", true ) end if(port == 3) then // screen 2 self.Screen2 = data[2] PCMod.Msg( "KVM recieved message from PC 2", true ) end if(port == 4) then // screen 3 self.Screen3 = data[2] PCMod.Msg( "KVM recieved message from PC 3", true ) end if(port == 5) then // screen 4 self.Screen4 = data[2] PCMod.Msg( "KVM recieved message from PC 4", true ) end end end end [/code] [i]lua/weapons/gmod_tool/stools/pcspawn_kvm.lua[/i] [code] if (!PCTool) then include( "pcmod/sh_tool.lua" ) end TOOL.Name = "KVM Switch" TOOL.Class = "pcspawn_kvm" TOOL.Desc = "Spawns a KVM Switch" TOOL.Inst = { { "Spawn a KVM Switch" } } TOOL.ModelList = { "models/props_lab/reciever01b.mdl" } TOOL.Type = "spawner" TOOL.SpawnType = "Hardware" TOOL.EntName = "KVM Switch" TOOL.EntClass = "pcmod_kvm" TOOL.DefaultMax = 8 TOOL.Model = TOOL.ModelList[1] local dat = PCTool.RegisterSTool( TOOL ) table.Merge( TOOL, dat ) if (SERVER) then function TOOL:BuildSetupData() return {} end end if (CLIENT) then function TOOL.BuildCPanel( panel ) local pf = "Tool_pcspawn_monitor_" // Header panel:AddControl( "Header", { Text = "#" .. pf .. "name", Description = "#" .. pf .. "desc" } ) // Model select panel:AddControl( "PropSelect", { Label = "Model:", ConVar = "pcspawn_monitor_model", Category = "pcmod", Models = list.Get( "mdls_pcspawn_monitor" ) } ) end end // I suggest any people looking to learn to make STools do NOT look and learn from this code, it is not the conventional way of doing it. -thomasfn [/code]
  • Avatar of Valeour
  • I want brains so i can be smart! :D Also, I had an idea about the printing without saving thing, can you do something like, when you press print, it checks if the file is saved or not, if it's not saved, it saves the text file as temp.txt, prints it off, then after it's printed, it deletes the temp.txt. I dunno if i explained that well, but that seems like it'd be able to work.
  • Avatar of mbainrot
  • @Valeour, its fine :) but thats a good idea building off that, instead of deleting it, why not override it? edit: my implementation [b]File:[/b] lua/pcmod/ssdevices/dev_win_notepad.lua [b]Starting Line:[/b] 94 BEFORE [code] if (btn == "btnPrint") then self:RunProgCommand( "notepad", "print" ) // self:SubmitCommand( "os_command", "sys_print", end [/code] AFTER [code] if (btn == "btnPrint") then fn = "temp.txt" // New self:SubmitContent( fn ) // New self:RunProgCommand( "notepad", "print" ) // self:SubmitCommand( "os_command", "sys_print", end [/code] Result? It works, and works well :), you can make continuous changes without adverse effect :) edit 3: (forgot the explanation :)) Basically the first two functions are a rip off of the "btnSave" code, it saves the current document as "temp.txt" and then resumes normal printing :) edit IV: I decided to do a test :) to help out with the routers not getting IP addresses :) [code] ::::Router Gets an IP and functions correctly:::: PCMod2: Spawning entity: models/props_lab/reciever01a.mdl,pcmod_router PCMod2: Resetting ent data (105)! PCMod2: Creating entity derived from pcmod_base... PCMod2: Making ScreenSpace... PCMod2: Turning device on! (105) PCMod2: Entity 105 reported event 'turnon' PCMod2: Initializing WebGear Router Core.. PCMod2: Adding EHook: driver, webgr_router, linked PCMod2: Adding EHook: driver, webgr_router, unlinked PCMod2: Installing driver 'webgr_router' to (105) PCMod2: Registered router 105 and aquired subnet 1 PCMod2: Setting ent data (wireless = false) PCMod2: Beaming ent data... PCMod2: Returning spawned entity! (pcmod_router) ::::Router Does not get an IP:::: PCMod2: Spawning entity: models/props_lab/reciever01a.mdl,pcmod_router PCMod2: Resetting ent data (114)! PCMod2: Creating entity derived from pcmod_base... PCMod2: Making ScreenSpace... PCMod2: Turning device on! (114) PCMod2: Entity 114 reported event 'turnon' PCMod2: Initializing WebGear Router Core.. PCMod2: Adding EHook: driver, webgr_router, linked PCMod2: Adding EHook: driver, webgr_router, unlinked PCMod2: Installing driver 'webgr_router' to (114) [highlight]PCMod2: Router 114 is already registered[/highlight] PCMod2: Setting ent data (wireless = false) PCMod2: Beaming ent data... PCMod2: Returning spawned entity! (pcmod_router) [/code] edit 5: [code] PCMod2: Spawning entity: models/props_lab/reciever01a.mdl,pcmod_brouter PCMod2: Resetting ent data (147)! PCMod2: Creating entity derived from pcmod_base... PCMod2: Making ScreenSpace... PCMod2: Turning device on! (147) PCMod2: Entity 147 reported event 'turnon' PCMod2: Initializing WebGear Router Core.. PCMod2: Adding EHook: driver, webgr_router, linked PCMod2: Adding EHook: driver, webgr_router, unlinked PCMod2: Installing driver 'webgr_router' to (147) PCMod2: Registered router 147(Backbone) and aquired subnet 4 PCMod2: Returning spawned entity! (pcmod_brouter) PCMod2: Small string recieved! (entdata) PCMod2: String beam started! (entdata) PCMod2: Spawning entity: models/props_lab/reciever01a.mdl,pcmod_brouter PCMod2: Resetting ent data (148)! PCMod2: Creating entity derived from pcmod_base... PCMod2: Making ScreenSpace... PCMod2: Turning device on! (148) PCMod2: Entity 148 reported event 'turnon' PCMod2: Initializing WebGear Router Core.. PCMod2: Adding EHook: driver, webgr_router, linked PCMod2: Adding EHook: driver, webgr_router, unlinked PCMod2: Installing driver 'webgr_router' to (148) [highlight]PCMod2: Router 148(Backbone) is already registered[/highlight] PCMod2: Returning spawned entity! (pcmod_brouter) PCMod2: Small string recieved! (entdata) PCMod2: String beam started! (entdata) [/code] edit 6: (did some hammering to see what would happen if there where 255+ backbone routers) the 256th [u]working[/u] back bone router resets to 10.0.0.0, subsequent backbone routers trigger an "infinite loop detected" [code] PCMod2: Spawning entity: models/props_lab/reciever01a.mdl,pcmod_brouter PCMod2: Resetting ent data (404)! PCMod2: Creating entity derived from pcmod_base... PCMod2: Making ScreenSpace... PCMod2: Turning device on! (404) PCMod2: Entity 404 reported event 'turnon' PCMod2: Initializing WebGear Router Core.. PCMod2: Adding EHook: driver, webgr_router, linked PCMod2: Adding EHook: driver, webgr_router, unlinked PCMod2: Installing driver 'webgr_router' to (404) Infinite Loop Detected! PCMod2: Small string recieved! (entdata) PCMod2: String beam started! (entdata) [/code]
  • Avatar of dustyjo
  • Alright, how the hell do you use Chatserv? I keep trying to connect to my damn server running chathost and it just hangs at "waiting for response" Even if I restart the damn computer and go back to the program, it still says "waiting for response" and I can't do anything.
  • Avatar of Valeour
  • Instead of restarting the in-game computer, why don't you come back to this thread, start from page one, use the eyes on your face, and [b]READ THE THREAD.[/b]
  • Avatar of thomasfn
  • [QUOTE=Valeour;13768061]Instead of restarting the in-game computer, why don't you come back to this thread, start from page one, use the eyes on your face, and [b]READ THE THREAD.[/b][/QUOTE] Thank you very much. Well said. And thanks all for those logs you posted, the more logs we have access to, the better chance there is we can fix the bug.
  • Avatar of Ryo Ohki
  • [QUOTE=gmt2001;13752586]If you are going to be pasting it back on the same GMOD server anyway then you can use the HD Copier which will save hard drives to the servers data folder, then after pasting you can paste the hard drive to it[/QUOTE] So let's see if i got it right.. Using the hd copier you can copy and paste hds correctly, alright So if you save it using the swep on a server it should keep it in that particular server.. but that means I simply have to use the swep and store a computer's hd, and the next time i connect and use the tool to give myself the swep, the HD will still be memorized there?
  • Avatar of hellowner
  • First, ubercool mod :P Just a fast thing: Is possible to make the I/O devices inputs&outputs renameable? (like "Light Switch" instead of "1" etc.) (i know, i destroyed the sense here, my english needs a total remake)
  • Avatar of thomasfn
  • [QUOTE=Ryo Ohki;13768250]So let's see if i got it right.. Using the hd copier you can copy and paste hds correctly, alright So if you save it using the swep on a server it should keep it in that particular server.. but that means I simply have to use the swep and store a computer's hd, and the next time i connect and use the tool to give myself the swep, the HD will still be memorized there?[/QUOTE] Yep. There was a serverside error with the swep, but it should still save ok. It's fixed in next update anyhow. You cannot rename your iodevices ingame, but if you are the server hoster / playing single player, you can change them in the sh_config.lua file in pcmod/lua/pcmod/. Also, there is a tutorial collection (small right now) at this url: [url]http://www.fortfn.co.uk/homepage/index.php?option=com_content&view=category&id=41&Itemid=69[/url]
  • Avatar of DarkWolf2
  • Sorry to bug again ( :( ), but i still have no idea where to put the music files. The PCMOD reads the titles i put in the CFG, but no music streams out of it. Any ideas?
  • Avatar of thomasfn
  • Your music should be in: [code]steamapps\<username>\garrysmod\garrysmod\sound\music\BLAH.mp3[/code] Your config music entry should look like this: [code]{ "music/BLAH.mp3", "My Song Name" }[/code]
  • Avatar of mbainrot
  • [QUOTE=Valeour;13773258]Can you like, add a USB Microwave? I'm REALLY hungry right now...[/QUOTE] USB DarkRP Microwave?
  • Avatar of MattyK
  • [QUOTE=Coona;13762718]For all the times I've wanted to say it: -snip-[/QUOTE] Conna, your a goddamn Troll in the ways of Roleplay. But we will forever love you for the epic builder tools you made us.
  • Avatar of Shadow_Hedgehog
  • This is defiently not compatible with DarkRP what so ever, other people off my server are unable to access many DarkRP functions, such as the scoreboard, F4 and other functions, it basically screws up DarkRP completely, !pcbuy is un usuable and it doesn't fix itself unless, for some reason, i spawn a PCmod entity, i have to spawn a monitor and tell clients to press E on it for them to beable to play on the server. Sucks. Don't start trolling at me, telling me to read the thread, i have, and i've applied this new DarkRP patch. The only thing it fixed was the comptech class in my view, he was unvotable and unplayable and now he is, but i'm not sure if it just me or if no one's applied this to there DarkRP server yet it messes up DarkRP's functions completely, i also quite frequently get errors when whoever the comptech is starts doing well, any thing to do with PCmod but i'll have to look into that, but for now im either trying the SVN or giving up on this.
  • Avatar of darkedone02
  • I try to add in my custom music, but the whole mod just breaks down on me... just add the lines for my music, and suddenly, the whole mod stop working on me when I launch it.
  • Avatar of thomasfn
  • @darkedone02: Check your console for any Lua errors. Chances are you missed a comma or something. @Shadow_Hedgehog: Same as dark, are there any Lua errors at all? Serverside especially. Could you PM me the IP address of your server so I can join and check it out?
  • Avatar of armorgun
  • thomasfn...you should add a webcam that can make photos and then print them:) ...will make it more fun and realistic
  • Avatar of Valeour
  • I don't think that's actually possible... Unless you actually took a screenshot and somehow printed it in html on the page... but then everyone else would need that screenshot to see it... I don't think it's possible.