/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(playerid, params[])
{
new string[128];
format(string, sizeof(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(playerid, COLOR_YELLOW, string);
SendClientMessageEx(playerid, COLOR_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 017: undefined symbol "PlayerInfo"
D:\michaelwcrp\filterscripts\Command(2).pwn(94) : warning 215: expression has no effect
D:\michaelwcrp\filterscripts\Command(2).pwn(94) : error 001: expected token: ";", but found "]"
D:\michaelwcrp\filterscripts\Command(2).pwn(94) : error 029: invalid expression, assumed zero
D:\michaelwcrp\filterscripts\Command(2).pwn(94) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
the lines getting error is this:-
PHP код:
format(string, sizeof(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.