format(string, sizeof string, "Wine Time Left: %d.", TimeConvert(GetPVarInt(playerid, "pPrisonWineTime"));
./includes/updates/prison_system.pwn(2231) : error 001: expected token: ",", but found ";"
if(PlayerInfo[playerid][pPrisonMWine] >= 1)
{
if(gettime() >> GetPVarInt(playerid, "pPrisonWineTime"))
{
SendClientMessageEx(playerid, COLOR_GREY, "Wine Time Left: 0:00:00.");
}
else
{
format(string, sizeof string, "Wine Time Left: %d.", TimeConvert(GetPVarInt(playerid, "pPrisonWineTime"));
SendClientMessageEx(playerid, COLOR_GREY, string);
}
}
string,sizeof (string)
format(string, sizeof string, "Prison Materials: %d.", PlayerInfo[playerid][pPrisonMaterials]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
./includes/updates/prison_system.pwn(2231) : error 001: expected token: ",", but found ";"
Can you explain why that needs () when this doesn't? Just curious.
PHP код:
|
Format
I don't really think thats the problem just typical of identation problem with the function you use named TimeConvert i guess! |
Can you explain why that needs () when this doesn't? Just curious.
|
Sizeof is an operator, not a function. Both ways of writing (with and without brackets) are correct and it is just a matter of personal preference. I tend to always use the brackets, except when sizeof appears in a function header, because I'm weird like that.
Anyway, in your original code I count three opening brackets and only two closing brackets. The compiler is expecting another parameter (hence, expected comma) because the statement isn't properly closed. |
format(string, sizeof string, "Wine Time Left: %d.", TimeConvert(GetPVarInt(playerid, "pPrisonWineTime")));