23.10.2012, 18:18
How to fix it.
Код:
if (strcmp("/id", cmdtext, true, 10) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /id [playerid/PartOfName]"); return 1; } new target; target = ReturnUser(tmp); new sstring[128]; if(IsPlayerConnected(target)) { if(target != INVALID_PLAYER_ID) { GetPlayerName(target, giveplayer, sizeof(giveplayer)); format(sstring, sizeof(sstring), "ID: (%d) %s",target,giveplayer); SendClientMessage(playerid, COLOR_GRAD1, sstring); } } } return 1; }
Код:
H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(772) : error 017: undefined symbol "tmp" H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(772) : error 017: undefined symbol "strtok" H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(773) : error 017: undefined symbol "tmp" H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(775) : error 017: undefined symbol "COLOR_GRAD2" H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(779) : error 017: undefined symbol "ReturnUser" H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(785) : error 017: undefined symbol "giveplayer" H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(785) : error 017: undefined symbol "giveplayer" H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(785) : error 029: invalid expression, assumed zero H:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(785) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Errors.