• Wont spawn
    8 replies, posted
Im trying to make a basic game mode for gmod, and i typed out all the lua, i join the game i cant see the vgui when i join. and i get this error in the console. i used this tutorial, [url]http://wiki.garrysmod.com/?title=Simple_Gamemode[/url] Executing listen server config file The nav mesh needs a full nav_analyze exec: couldn't exec listenserver.cfg [L] Underfire Map: gm_flatgrass Players: 1 / 5 Build: 3791 Server Number: 1 Adding master server 69.28.140.246:27011 Adding master server 69.28.140.247:27011 No pure server whitelist. sv_pure = 0 Connection to Steam servers successful. VAC secure mode is activated. InitFastCopy: only 49% fast props. Bug? Lua initialized (Lua 5.1) [resource.AddFile] File models\weapons\darocket.mdl didn't exist! [resource.AddFile] File models\weapons\v_jb.ani didn't exist! [resource.AddFile] File models\weapons\v_jb.phy didn't exist! [resource.AddFile] File models\weapons\v_jb.jpg didn't exist! [resource.AddFile] File models\weapons\v_jb.dx80 didn't exist! [resource.AddFile] File models\weapons\v_jb.dx90 didn't exist! [resource.AddFile] File models\weapons\w_jb.ani didn't exist! [resource.AddFile] File models\weapons\w_jb.jpg didn't exist! [resource.AddFile] File models\weapons\w_jb.dx80 didn't exist! [resource.AddFile] File models\weapons\w_jb.dx90 didn't exist! [resource.AddFile] File materials\models\weapons\v_models\pr0d.c4\and.vmt didn't exist! [resource.AddFile] File materials\models\weapons\v_models\pr0d.c4\screen_on_ref.vtf didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\bomb1.vtf didn't exist! [resource.AddFile] File materials\models\weapons\v_models\pr0d.c4\bomb1_planted.vmt didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\bomb2.vtf didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\bomb3b.vtf didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\hand.vtf didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\screen_04.vtf didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\screen_45.vtf didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\screen_active.vtf didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\screen_on.vtf didn't exist! [resource.AddFile] File materials\models\weapons\w_models\pr0d.c4\screen_off.vtf didn't exist! -NPC Control- Main Content Loaded Episode 2 Content Loaded! -------------------- LuaGetfile: Not Loading autorun\tf_concommands (2).lua Couldn't include file 'autorun/tf_concommands (2).lua' (File not found) autorun/client/hello.lua:1: attempt to index global 'SWEP' (a nil value) Underfire/gamemode/cl_init.lua:34: 'end' expected (to close 'function' at line 3) near '<eof>' ********************************************** ********************************************** ********** COULDN'T LOAD GAMEMODE!! ********** ********************************************** ********************************************** There was a problem opening the gamemode file 'Underfire/gamemode/cl_init.lua' Registering gamemode 'Underfire' derived from 'base' --- Missing Vgui material weapons/c4_sg_killicon weapons/coltm45.56/shared.lua:47: unexpected symbol near '=' weapons/m4carbine/shared.lua:50: unfinished string near '"none' weapons/smod_leg/shared.lua:178: '<eof>' expected near 'end' entities\mario_sent_atomic_bomb\shared.lua:6: unfinished string near '"RayFanMan(RayFan9876)' Folder = entities/mario_sent_atomic_bomb AdminSpawnable = true Spawnable = false Couldn't register Scripted Entity mario_sent_atomic_bomb - the Type field is empty! entities\mk-82-fragile_sent_atomic_bomb\shared.lua:6: unfinished string near '"RayFanMan(RayFan9876)' Folder = entities/mk-82-fragile_sent_atomic_bomb AdminSpawnable = true Spawnable = false Couldn't register Scripted Entity mk-82-fragile_sent_atomic_bomb - the Type field is empty! Sending 9 'User Info' ConVars to server (cl_spewuserinfoconvars to see) ERROR: GAMEMODE:'PlayerInitialSpawn' Failed: Underfire/gamemode/init.lua:23: attempt to call global 'CheckSpecialCharacters' (a nil value) This server is compatible with the NPC Controls mod :1: attempt to call method 'AddNotify' (a nil value) Redownloading all lightmaps Hook 'checksleeping' Failed: weapons\tranq\shared.lua:290: bad argument #1 to 'pairs' (table expected, got nil) --- Missing Vgui material vgui/..\vgui\icon_con_high
Can you put the code in between [code] tags?
Few guesses, all these errors: [code] LuaGetfile: Not Loading autorun\tf_concommands (2).lua Couldn't include file 'autorun/tf_concommands (2).lua' (File not found) autorun/client/hello.lua:1: attempt to index global 'SWEP' (a nil value) Underfire/gamemode/cl_init.lua:34: 'end' expected (to close 'function' at line 3) near '<eof>' ********************************************** ********************************************** ********** COULDN'T LOAD GAMEMODE!! ********** ********************************************** ********************************************** weapons/coltm45.56/shared.lua:47: unexpected symbol near '=' weapons/m4carbine/shared.lua:50: unfinished string near '"none' weapons/smod_leg/shared.lua:178: '<eof>' expected near 'end' entities\mario_sent_atomic_bomb\shared.lua:6: unfinished string near '"RayFanMan(RayFan9876)' entities\mk-82-fragile_sent_atomic_bomb\shared.lua:6: unfinished string near '"RayFanMan(RayFan9876)' ERROR: GAMEMODE:'PlayerInitialSpawn' Failed: Underfire/gamemode/init.lua:23: attempt to call global 'CheckSpecialCharacters' (a nil value) Hook 'checksleeping' Failed: weapons\tranq\shared.lua:290: bad argument #1 to 'pairs' (table expected, got nil)[/code] What ever files you wrote, check them. Start at the top.
[code]include( 'shared.lua' ) //LOAD THAT function set_team() //Function for the window when joining as neither special character nor Admin Ready = vgui.Create( "DFrame" ) //Define ready as a "DFrame" Ready:SetPos( ScrW() / 2, ScrH() / 2 ) //Set the position. Half the screen height and half the screen width. This will result in being bottom right of the middle of the screen. Ready:SetSize( 1000, 1000 ) //The size, in pixels of the Frame Ready:SetTitle( "Welcome to UnderFire Gamemode Built By Chris." ) //The title; It's at the top. Ready:SetVisible( true ) // Should it be seen? Ready:SetDraggable( true ) // Can people drag it around? Ready:ShowCloseButton( true ) //Show the little X top right? I chose no, because I have no alternative, meaning people would roam around with no weapons Ready:MakePopup() //Make it popup. Of course. ready1 = vgui.Create( "DButton", Ready ) // Define ready1 as a "DButton" with its parent the Ready frame we just created above. ready1:SetPos( 20, 25 ) //Set position, relative to the frame (If you didn't parent it, it would be relative to the screen ready1:SetSize( 240, 300 ) // How big it should be, again in pixels ready1:SetText( "Become Shotgunner!" ) //What should the button say? ready1.DoClick = function() //ready1.doclick = function, we just defined it as a function RunConsoleCommand( "sb_team1" ) //When it clicks, which function does it run? sb_team1, which is defined in init.lua ready1 = vgui.Create( "DButton", Ready ) // Define ready1 as a "DButton" with its parent the Ready frame we just created above. ready1:SetPos( 20, 25 ) //Set position, relative to the frame (If you didn't parent it, it would be relative to the screen ready1:SetSize( 240, 300 ) // How big it should be, again in pixels ready1:SetText( "Become Riflemen!" ) //What should the button say? ready1.DoClick = function() //ready1.doclick = function, we just defined it as a function RunConsoleCommand( "sb_team2" ) //When it clicks, which function does it run? sb_team1, which is defined in init.lua end // end the doclick function end // end the set_team function concommand.Add( "sb_start", set_team ) //Now we add a console command for the function we just created. It can be run straight from the console. If you look under the first couple of lines under init.lua, we // said that it should run this command! end[/code] im pretty new to this so wheres the error lol
Need another end after the first DoClick command. [lua]include( 'shared.lua' ) //LOAD THAT function set_team() //Function for the window when joining as neither special character nor Admin Ready = vgui.Create( "DFrame" ) //Define ready as a "DFrame" Ready:SetPos( ScrW() / 2, ScrH() / 2 ) //Set the position. Half the screen height and half the screen width. This will result in being bottom right of the middle of the screen. Ready:SetSize( 1000, 1000 ) //The size, in pixels of the Frame Ready:SetTitle( "Welcome to UnderFire Gamemode Built By Chris." ) //The title; It's at the top. Ready:SetVisible( true ) // Should it be seen? Ready:SetDraggable( true ) // Can people drag it around? Ready:ShowCloseButton( true ) //Show the little X top right? I chose no, because I have no alternative, meaning people would roam around with no weapons Ready:MakePopup() //Make it popup. Of course. ready1 = vgui.Create( "DButton", Ready ) // Define ready1 as a "DButton" with its parent the Ready frame we just created above. ready1:SetPos( 20, 25 ) //Set position, relative to the frame (If you didn't parent it, it would be relative to the screen ready1:SetSize( 240, 300 ) // How big it should be, again in pixels ready1:SetText( "Become Shotgunner!" ) //What should the button say? ready1.DoClick = function() //ready1.doclick = function, we just defined it as a function RunConsoleCommand( "sb_team1" ) //When it clicks, which function does it run? sb_team1, which is defined in init.lua end // End this DoClick function. ready1 = vgui.Create( "DButton", Ready ) // Define ready1 as a "DButton" with its parent the Ready frame we just created above. ready1:SetPos( 20, 25 ) //Set position, relative to the frame (If you didn't parent it, it would be relative to the screen ready1:SetSize( 240, 300 ) // How big it should be, again in pixels ready1:SetText( "Become Riflemen!" ) //What should the button say? ready1.DoClick = function() //ready1.doclick = function, we just defined it as a function RunConsoleCommand( "sb_team2" ) //When it clicks, which function does it run? sb_team1, which is defined in init.lua end // end the doclick function end // end the set_team function concommand.Add( "sb_start", set_team ) //Now we add a console command for the function we just created. It can be run straight from the console. If you look under the first couple of lines under init.lua, we // said that it should run this command! end[/lua]
Thanks for the quick posts, and i will try this in a second. [editline]06:16PM[/editline] [QUOTE=pdkm931;16956194]Need another end after the first DoClick command. [lua]include( 'shared.lua' ) //LOAD THAT function set_team() //Function for the window when joining as neither special character nor Admin Ready = vgui.Create( "DFrame" ) //Define ready as a "DFrame" Ready:SetPos( ScrW() / 2, ScrH() / 2 ) //Set the position. Half the screen height and half the screen width. This will result in being bottom right of the middle of the screen. Ready:SetSize( 1000, 1000 ) //The size, in pixels of the Frame Ready:SetTitle( "Welcome to UnderFire Gamemode Built By Chris." ) //The title; It's at the top. Ready:SetVisible( true ) // Should it be seen? Ready:SetDraggable( true ) // Can people drag it around? Ready:ShowCloseButton( true ) //Show the little X top right? I chose no, because I have no alternative, meaning people would roam around with no weapons Ready:MakePopup() //Make it popup. Of course. ready1 = vgui.Create( "DButton", Ready ) // Define ready1 as a "DButton" with its parent the Ready frame we just created above. ready1:SetPos( 20, 25 ) //Set position, relative to the frame (If you didn't parent it, it would be relative to the screen ready1:SetSize( 240, 300 ) // How big it should be, again in pixels ready1:SetText( "Become Shotgunner!" ) //What should the button say? ready1.DoClick = function() //ready1.doclick = function, we just defined it as a function RunConsoleCommand( "sb_team1" ) //When it clicks, which function does it run? sb_team1, which is defined in init.lua end // End this DoClick function. end ready1 = vgui.Create( "DButton", Ready ) // Define ready1 as a "DButton" with its parent the Ready frame we just created above. ready1:SetPos( 20, 25 ) //Set position, relative to the frame (If you didn't parent it, it would be relative to the screen ready1:SetSize( 240, 300 ) // How big it should be, again in pixels ready1:SetText( "Become Riflemen!" ) //What should the button say? ready1.DoClick = function() //ready1.doclick = function, we just defined it as a function RunConsoleCommand( "sb_team2" ) //When it clicks, which function does it run? sb_team1, which is defined in init.lua end // end the doclick function end // end the set_team function concommand.Add( "sb_start", set_team ) //Now we add a console command for the function we just created. It can be run straight from the console. If you look under the first couple of lines under init.lua, we // said that it should run this command! end[/lua][/QUOTE] I put another end in at line 24 now. i get this in my console. [code] LuaGetfile: Not Loading autorun\tf_concommands (2).lua Couldn't include file 'autorun/tf_concommands (2).lua' (File not found) autorun/client/hello.lua:1: attempt to index global 'SWEP' (a nil value) Underfire/gamemode/cl_init.lua:1: '=' expected near 'plaincopy' ********************************************** ********************************************** ********** COULDN'T LOAD GAMEMODE!! ********** ********************************************** ********************************************** There was a problem opening the gamemode file 'Underfire/gamemode/cl_init.lua' Registering gamemode 'Underfire' derived from 'base' --- Missing Vgui material weapons/c4_sg_killicon weapons/coltm45.56/shared.lua:47: unexpected symbol near '=' weapons/m4carbine/shared.lua:50: unfinished string near '"none' weapons/smod_leg/shared.lua:178: '<eof>' expected near 'end' entities\mario_sent_atomic_bomb\shared.lua:6: unfinished string near '"RayFanMan(RayFan9876)' Folder = entities/mario_sent_atomic_bomb AdminSpawnable = true Spawnable = false Couldn't register Scripted Entity mario_sent_atomic_bomb - the Type field is empty! entities\mk-82-fragile_sent_atomic_bomb\shared.lua:6: unfinished string near '"RayFanMan(RayFan9876)' Folder = entities/mk-82-fragile_sent_atomic_bomb AdminSpawnable = true Spawnable = false Couldn't register Scripted Entity mk-82-fragile_sent_atomic_bomb - the Type field is empty! Sending 9 'User Info' ConVars to server (cl_spewuserinfoconvars to see) ERROR: GAMEMODE:'PlayerInitialSpawn' Failed: Underfire/gamemode/init.lua:23: attempt to call global 'CheckSpecialCharacters' (a nil value) This server is compatible with the NPC Controls mod :1: attempt to call method 'AddNotify' (a nil value) Redownloading all lightmaps Hook 'checksleeping' Failed: weapons\tranq\shared.lua:290: bad argument #1 to 'pairs' (table expected, got nil) [/code] I spawn as my riflemen class now, but i dont have the choice to choose my class, cause no vgui screen pops up.
And remove the last end, you don't need a end after a console command, and you do end the function before the command.
Jesus... How many errors do you have!!! Ive never had this many errors AT ONCE! Just... Wow...
[QUOTE=pdkm931;16976083]And remove the last end, you don't need a end after a console command, and you do end the function before the command.[/QUOTE] Oh GREAT JOB! Thank you again that fixed it!
Sorry, you need to Log In to post a reply to this thread.