27.12.2009, 22:41
can someone please help to fix this?
errors:
Код:
if(strcmp(cmd, "/rape", true) == 0) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rape [id]"); return 1; } new giveplayerid = strval(tmp); if(!IsPlayerConnected(giveplayerid)) { SendClientMessage(playerid, COLOR_WHITE, "Invalid ID!"); return 1; } new Float:health; new raped[MAX_PLAYER_NAME]; new raper[MAX_PLAYER_NAME]; GetPlayerName(giveplayerid, raped, sizeof (raped)); GetPlayerName(playerid, raper, sizeof (raper)); new string2[100]; new string3[100]; if(GetDistanceBetweenPlayers(playerid,giveplayerid) >= 2) { SendClientMessage(playerid, COLOR_RED, "ERROR:Too Far Away!"); } else { ApplyAnimation(giveplayerid,"PED", "WALK_DRUNK",4.0,0,1,0,0,0); SetPlayerHealth(giveplayerid, GetPlayerHealth(giveplayerid, health) -15); format(string3, sizeof(string3), "You've been raped by %s", raper); SendClientMessage(giveplayerid,COLOR_GREEN, string3); format(string2,sizeof(string2), "You have raped %s", raped); SendClientMessage(playerid, COLOR_YELLOW, string2); SendClientMessage(giveplayerid, COLOR_WHITE, "You've been infected with Aids"); TogglePlayerControllable(giveplayerid, 1); } return 1; }
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(686) : error 017: undefined symbol "cmd" C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(688) : error 017: undefined symbol "tmp" C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(688) : error 017: undefined symbol "strtok" C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(689) : error 017: undefined symbol "tmp" C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(694) : error 017: undefined symbol "tmp" C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(707) : error 017: undefined symbol "GetDistanceBetweenPlayers" C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\kfs.pwn(1053) : warning 203: symbol is never used: "fishNames" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.