Hello i am trying to open a garys mod server and i keep getting an lua error..please help me
The error [CODE][ERROR] gamemodes/rp/gamemode/sv_hooks.lua:107: attept to call field 'simple' (a nil value)[/CODE]
Heres the sv_hooks.lua 100-110 lines
[CODE]GAMEMODE.LastSaveYear = GAMEMODE.CurrentYear;
GAMEMODE.LastSaveMonth = GAMEMODE.CurrentMonth;
GAMEMODE.LastSaveDay = GAMEMODE.CurrentDay;
//GAMEMODE.CurrentTemperature = (AVERAGE_TEMPERATURES[GAMEMODE.CurrentMonth][1] + AVERAGE_TEMPERATURES[GAMEMODE.CurrentMonth][2]) * .5;
//SetGlobalInt("temp", GAMEMODE.CurrentTemperature);
//Msg("Current in-game date: " .. GAMEMODE.CurrentMonth .. "/" .. GAMEMODE.CurrentDay .. "/" .. GAMEMODE.CurrentYear .. "\n");
GAMEMODE.CanSaveDate = true;
Msg("Date saving authorized.\n");
end);
SetGlobalInt("tv_status", 0);
end
function GM:InitPostEntity ( )
self.GatherInvalidNames();
timer.simple(1, GAMEMODE.PushNumPlayers);
end
function GM:PlayerInitialSpawn ( Player )
Player.PlayerItems = {}
Player.StorageItems = {}
Player:SetTeam(TEAM_CITIZEN)
Player:ConCommand("playx_enabled 0")
Player:ConCommand("cl_playerspraydisable 1")
self.PushNumPlayers();
timer.Simple(5, GAMEMODE.SendJobInformation, Player)
end[/CODE]
timer.Simple
[CODE]
function GM:InitPostEntity ( )
self.GatherInvalidNames();
timer.Simple(1, GAMEMODE.PushNumPlayers);
end
[/CODE]
[QUOTE=Ivef;41875813][CODE]
function GM:InitPostEntity ( )
self.GatherInvalidNames();
timer.Simple(1, GAMEMODE.PushNumPlayers);
end
[/CODE][/QUOTE]
I know..but what i need to do to fix it ?
Replace "simple" with "Simple".
[QUOTE=Ivef;41876017]Replace "simple" with "Simple".[/QUOTE]
Now i get [CODE]bad argument #2 to 'Simple'[/CODE]
[lua]timer.Simple(5, GAMEMODE.SendJobInformation, Player)[/lua]
This syntax is obsolete.
it's delay, function.
[QUOTE=vexx21322;41876164][lua]timer.Simple(5, GAMEMODE.SendJobInformation, Player)[/lua]
This syntax is obsolete.
it's delay, function.[/QUOTE]
Thank you very much ! solved
Sorry, you need to Log In to post a reply to this thread.