So basicly im making a gamemode and when i try to run it i get an error
“There was a problem opening the gamemode file 'Gamemode/gamemode/init.lua”
So i think this is because of my crappy code if anyone of you have the time i would like you to look at it.
Init.lua
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
AddCSLuaFile( "vgui/PLoadout.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( pl:MainW )
pl:Give( pl:SecW )
pl:Give( pl:MeleeW )
end
function SpawnCake()
CakeSpawn = {}
CakeSpawn = ents.FindByClass( "info_cake_spawn" )
if(CakeSpawn == nil)
--TODO:
--Insert Error Message
end
end
cl_init.lua
include( 'shared.lua' )
// Clientside only stuff goes here
me = {}
me = LocalPlayer()
--Setup player vars
me:MainW = {}
me:SecW = {}
me:MeleeW = {}
me:MainW = "weapon_shotgun"
me:SecW = "weapon_pistol"
me:MeleeW = "weapon_crowbar"
I won’t bother with shared.lua cuz i don’t think there is a problem there,
one of the things im most worried about is the way i call variables like “me” and not only try to use them cross multiple lua files but also try to declare them as a part of the player(so i can have one copy for each player)
Anyway, any help from you guys would be appreciated.