29.09.2012, 20:44
Guyz Can Anyone Help Me ? I Got A Problem This Is The Code I Use
And It Shows This Error:
Can Anyone Help Me Pls? Urgent
Code:
if(strcmp(cmd, "/setscore", true) == 0) { new sendername[MAX_PLAYER_NAME]; new tmp[256]; new tmp2[256]; tmp = strtok(cmdtext, idx); new givenplayer = strval(tmp); tmp2 = strtok(cmdtext, idx); new score = strval(tmp2); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setscore [playerid] [Score]"); if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, "Invaild player ID!"); SetPlayerScore(givenplayer,score); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Admin \"%s\" has just set your score to %d!", sendername, score); SendClientMessage(otherplayer, COLOR_GREEN, string); return 1; }
Code:
C:\Users\GMZeus\Desktop\Clean\gamemodes\XS.pwn(7127) : error 017: undefined symbol "otherplayer" C:\Users\GMZeus\Desktop\Clean\gamemodes\XS.pwn(7130) : error 017: undefined symbol "string" C:\Users\GMZeus\Desktop\Clean\gamemodes\XS.pwn(7130) : error 017: undefined symbol "string" C:\Users\GMZeus\Desktop\Clean\gamemodes\XS.pwn(7130) : error 029: invalid expression, assumed zero C:\Users\GMZeus\Desktop\Clean\gamemodes\XS.pwn(7130) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.