SA-MP Forums Archive
/nextpaycheck error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /nextpaycheck error (/showthread.php?tid=608149)



/nextpaycheck error - LifeRah - 28.05.2016

Hello, i made this CMD to show the time left in next paycheck:-
PHP код:
CMD:nextpaycheck(playeridparams[])
{
    new 
string[128];
    
format(stringsizeof(string), "Total Minutes since last Paycheck: %d  Approximate time until next Paycheck: %d"floatround(PlayerInfo[playerid][pConnectSeconds]/60), floatround((3600-PlayerInfo[playerid][pConnectSeconds]) / 60));
    
SendClientMessageEx(playeridCOLOR_YELLOWstring);
    
SendClientMessageEx(playeridCOLOR_GRAD2"Please note that you will not accrue time if your game is paused.");
    return 
1;

but it gives this error:-
PHP код:
D:\michaelwcrp\filterscripts\Command(2).pwn(94) : error 017undefined symbol "PlayerInfo"
D:\michaelwcrp\filterscripts\Command(2).pwn(94) : warning 215expression has no effect
D
:\michaelwcrp\filterscripts\Command(2).pwn(94) : error 001expected token";"but found "]"
D:\michaelwcrp\filterscripts\Command(2).pwn(94) : error 029invalid expressionassumed zero
D
:\michaelwcrp\filterscripts\Command(2).pwn(94) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

the lines getting error is this:-
PHP код:
format(stringsizeof(string), "Total Minutes since last Paycheck: %d  Approximate time until next Paycheck: %d"floatround(PlayerInfo[playerid][pConnectSeconds]/60), floatround((3600-PlayerInfo[playerid][pConnectSeconds]) / 60)); 
kindly tell me how to fix this CMD!


Re: /nextpaycheck error - luke49 - 28.05.2016

How do you create pConnectSeconds? Show me your enum.