so im trying to create this gamemode were you start with a crowbar, nothing else. heres what i edited the init.lua to look like-
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( 'shared.lua'
// Serverside only stuff goes here
/*---------------------------------------------------------
Name: gamemode:PlayerLoadout( )
Desc: Give the player the default spawning weapons/ammo
---------------------------------------------------------*/
function GM:PlayerLoadout( pl )
pl:StripWeapons()
pl:Give( "weapon_crowbar" )
end
(ive downloaded the "skeleton gamemode" b garry) and so i load up my game after overiding sandbox with my mode and i get this message-
[gamemodes\laststand\gamemode\init.lua:14] ')' expected (to close '(' at line 4) near 'function'
[cpp]
There was a problem opening the gamemode file 'LastStand/gamemode/init.lua'
Registering gamemode 'LastStand' derived from 'base'
-and i start with an smg, pistol, 2 grenades, stunstick, gravity gun, and crowbar... not what i bargained for.
.....anyone have any idea how i can fix this?? ive tried just about everything but just cant get it to work. thanks.
there is a close bracket missing on
include( 'shared.lua' )
that's line 4. i assume.
[QUOTE=EpicExplosion;31273655]there is a close bracket missing on
include( 'shared.lua' )
that's line 4. i assume.[/QUOTE]
oh wow i feel stupid, it looks like that did it. much appreciated.
glad to help! :smile:
It's quite surprising what a missing parentheses can do.
Can i please ask you to use [noparse][lua] [/lua][/noparse] tags next time, it really helps us when reading your code, thanks :)
Sorry, you need to Log In to post a reply to this thread.