24.12.2014, 19:19
Hello Guys.
this line 2047
Quote:
D:\try\gamemodes\textdraws.pwn(2047) : error 029: invalid expression, assumed zero D:\try\gamemodes\textdraws.pwn(2047) : warning 215: expression has no effect D:\try\gamemodes\textdraws.pwn(2047) : error 001: expected token: ";", but found "if" |
Quote:
else if (sscanf(params, "iis[64]", style, time, text)) return SendClientMessage(playerid, -1, "Usage: /announce <style[0-6]> <time in ms> <text>"); |
PHP код:
CMD:announce(playerid, params[])
{
new text[64], time, style;
if(PlayerInfo[playerid][pRank] >= 1 && PlayerInfo[playerid][pRank] <= 8)
else if (sscanf(params, "iis[64]", style, time, text)) return SendClientMessage(playerid, -1, "Usage: /announce <style[0-6]> <time in ms> <text>");
else if (strlen(text) > 64) return SendClientMessage(playerid, -1, "Message too long, please make it with less than 64 letters!");
else if(style == 2) return SendClientMessage(playerid, -1, "Bug with style 2! Do not use it!");
else if (style < 0 || style > 6) return SendClientMessage(playerid, -1,"Invalid style");
else if (time > 20*1000) return SendClientMessage(playerid, -1, "No longer than 20 seconds");
else {
GameTextForAll(text, time, style);
}
return 1;
}