1. Post #121

    May 2008
    2 Posts
    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?

  2. Post #122
    Chipstik's Avatar
    September 2008
    165 Posts
    :O My model!

    My bad.

    I don't know why it's giving that error. Are you running the latest version?

  3. Post #123

    May 2008
    2 Posts
    :O My model!

    My bad.

    I don't know why it's giving that error. Are you running the latest version?
    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.

  4. Post #124
    Choppie's Avatar
    January 2007
    81 Posts
    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.
    Valeour, you're turning into some kind of...ZOMBIE! Look out thomas, he's coming for you next! xD

  5. Post #125
    mbainrot's Avatar
    August 2008
    178 Posts
    Thanks for the SVN :), I'll continue testing and pushing it to the limits so we can diffinitly say x number of (insert device name here) 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 :)

  6. Post #126
    Gold Member
    implaying8's Avatar
    May 2005
    263 Posts
    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.

  7. Post #127
    leader1337's Avatar
    February 2008
    134 Posts
    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.

  8. Post #128
    Coona's Avatar
    February 2009
    1 Posts
    For all the times I've wanted to say it:

    Reply With Quote Edit / Delete Reply United Kingdom Show Events Dumb Dumb x 2 (list)

  9. Post #129
    mbainrot's Avatar
    August 2008
    178 Posts
    @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

  10. Post #130
    Gold Member
    Achilles123's Avatar
    July 2006
    2,661 Posts
    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.

  11. Post #131

    August 2007
    152 Posts
    Also how do you connect speakers? It keep saying No ports.
    Tower->Splitter->Speaker

    @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
    We are aware of this. for now you can use Wireless to connect more then 2 routers

    And also what the hell a "Server" Computer Tower is actually used for? I'm incredibly confused.
    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

    Thanks for the SVN :), I'll continue testing and pushing it to the limits so we can diffinitly say x number of (insert device name here) 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 :)
    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

  12. Post #132
    mbainrot's Avatar
    August 2008
    178 Posts
    ...
    We are aware of this. for now you can use Wireless to connect more then 2 routers
    ..
    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)
    lua/entities/pcmod_kvm/shared.lua
    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
    lua/weapons/gmod_tool/stools/pcspawn_kvm.lua
    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

  13. Post #133
    Valeour's Avatar
    October 2007
    176 Posts
    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.

  14. Post #134
    mbainrot's Avatar
    August 2008
    178 Posts
    @Valeour, its fine :) but thats a good idea

    building off that, instead of deleting it, why not override it?

    edit: my implementation
    File: lua/pcmod/ssdevices/dev_win_notepad.lua
    Starting Line: 94
    BEFORE
    Code:
    	if (btn == "btnPrint") then
    		self:RunProgCommand( "notepad", "print" )
    		// self:SubmitCommand( "os_command", "sys_print", 
    	end
    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
    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)
    PCMod2: Router 114 is already registered
    PCMod2: Setting ent data (wireless = false)
    PCMod2: Beaming ent data...
    PCMod2: Returning spawned entity! (pcmod_router)
    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)
    PCMod2: Router 148(Backbone) is already registered
    PCMod2: Returning spawned entity! (pcmod_brouter)
    PCMod2: Small string recieved! (entdata)
    PCMod2: String beam started! (entdata)
    edit 6: (did some hammering to see what would happen if there where 255+ backbone routers)

    the 256th working 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)

  15. Post #135
    Gold Member
    dustyjo's Avatar
    February 2005
    1,034 Posts
    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.

  16. Post #136
    Valeour's Avatar
    October 2007
    176 Posts
    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 READ THE THREAD.

  17. Post #137
    Gold Member
    thomasfn's Avatar
    July 2008
    2,946 Posts
    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 READ THE THREAD.
    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.

  18. Post #138
    Ryo Ohki's Avatar
    March 2008
    1,394 Posts
    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
    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?

  19. Post #139
    hellowner's Avatar
    June 2008
    4 Posts
    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)

  20. Post #140
    Gold Member
    thomasfn's Avatar
    July 2008
    2,946 Posts
    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?
    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:

    http://www.fortfn.co.uk/homepage/ind...d=41&Itemid=69

  21. Post #141
    Gold Member
    DarkWolf2's Avatar
    July 2007
    6,428 Posts
    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?

  22. Post #142
    Gold Member
    thomasfn's Avatar
    July 2008
    2,946 Posts
    Your music should be in:

    Code:
    steamapps\<username>\garrysmod\garrysmod\sound\music\BLAH.mp3
    Your config music entry should look like this:

    Code:
    { "music/BLAH.mp3", "My Song Name" }
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Friendly Friendly x 1 (list)

  23. Post #143
    Valeour's Avatar
    October 2007
    176 Posts
    Can you like, add a USB Microwave? I'm REALLY hungry right now...

  24. Post #144
    mbainrot's Avatar
    August 2008
    178 Posts
    Can you like, add a USB Microwave? I'm REALLY hungry right now...
    USB DarkRP Microwave?

  25. Post #145
    Gold Member
    MattyK's Avatar
    September 2006
    377 Posts
    For all the times I've wanted to say it:

    -snip-
    Conna, your a goddamn Troll in the ways of Roleplay.
    But we will forever love you for the epic builder tools you made us.

  26. Post #146
    Shadow_Hedgehog's Avatar
    February 2009
    298 Posts
    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.

  27. Post #147
    Gold Member
    darkedone02's Avatar
    February 2006
    2,534 Posts
    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.

  28. Post #148
    Gold Member
    thomasfn's Avatar
    July 2008
    2,946 Posts
    @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?

  29. Post #149
    armorgun's Avatar
    June 2008
    10 Posts
    thomasfn...you should add a webcam that can make photos and then print them:) ...will make it more fun and realistic

  30. Post #150
    Valeour's Avatar
    October 2007
    176 Posts
    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.

  31. Post #151
    Choppie's Avatar
    January 2007
    81 Posts
    thomasfn, I've been around a few servers with PCMod 2 on them, and the save button on notepad doesn't work on any. No lua errors appear, but when I try to send a page to print to a servers "printshare" it just crashes the server completely.

  32. Post #152
    Gold Member
    thomasfn's Avatar
    July 2008
    2,946 Posts
    thomasfn, I've been around a few servers with PCMod 2 on them, and the save button on notepad doesn't work on any. No lua errors appear, but when I try to send a page to print to a servers "printshare" it just crashes the server completely.
    Which server, the ingame server entity, or the actual server you are playing on?

  33. Post #153
    Ankpuss's Avatar
    July 2006
    258 Posts
    Does anyone use this with cakescript? It doesn't work on my server and i was wondering if anyone else is having the same problem!

    Thanks!

  34. Post #154
    Gold Member
    thomasfn's Avatar
    July 2008
    2,946 Posts
    I haven't made a plugin for cakescript, simple because I have never played/looked at code for cakescript and I have no idea how it works. If an experienced Lua coder/cakescript genius wants to make a plugin, I'll be sure to include it in the svn/release.

  35. Post #155
    Choppie's Avatar
    January 2007
    81 Posts
    Which server, the ingame server entity, or the actual server you are playing on?
    I've been around some Gmod servers is what I meant, thomas.

  36. Post #156
    Valeour's Avatar
    October 2007
    176 Posts
    I think the save function has troubles with ULX and possibly other admin mods.

  37. Post #157
    Gold Member
    thomasfn's Avatar
    July 2008
    2,946 Posts
    I've been around some Gmod servers is what I meant, thomas.
    And I meant, which type of server are you on about crashing?



    And I have spoken to LuaBanana about his Datastream module colliding with ULX. He says he has recieved reports of it, but I'm not sure what's happening with it. I'll bug him some more.

  38. Post #158
    Choppie's Avatar
    January 2007
    81 Posts
    And I meant, which type of server are you on about crashing?
    The actual Gmod server crashes

  39. Post #159
    Gold Member
    thomasfn's Avatar
    July 2008
    2,946 Posts
    The actual Gmod server crashes
    Sounds like an infinite loop issue, with which the likely culprit is networking. This has made the whole networking thing more urgent, I'll make sure this is forwarded to my other developer. Thanks.

  40. Post #160
    Choppie's Avatar
    January 2007
    81 Posts
    Sounds like an infinite loop issue, with which the likely culprit is networking. This has made the whole networking thing more urgent, I'll make sure this is forwarded to my other developer. Thanks.
    Hope it gets fixed, our server has crashed 3 times because of this :(

    Also, did I mention the Save button not working in MP?