26.02.2011, 21:58
so I wanted to create a command witch will give +1 score and save it in users file..
Here will be the error lines:
and here is the command:
Here will be the error lines:
Код:
error 017: undefined symbol "COLOR_GRAY" error 033: array must be indexed (variable "gPlayerAccount") error 033: array must be indexed (variable "gPlayerAccount") error 017: undefined symbol "COLOR_GRAY" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
if(strcmp("/giverespect", cmd, true) == 0) { { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /giverespect [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_GRAY,"Server: This player is not online!"); } if (PlayerInfo[id][gPlayerAccount] < 400) { new amsg[100]; new victimid[MAX_PLAYERS]; GetPlayerName(id, victimid, sizeof(victimid)); format(amsg,sizeof(amsg),"Server: You have given %s one respect point!",victimid); SendClientMessage(pid,COLOR_LIGHTBLUE,amsg); PlayerInfo[id][gPlayerAccount]++; return 1; } else SendClientMessage(pid,COLOR_GRAY,"Server: This player already haves too many permissons (over 400)!"); } }