27.08.2014, 16:50
Iv'e created a pm cmd but i get errors
Код:
CMD:pm(playerid, params[]) { new str[128], str[128], id, Name1[MAX_PLAYER_NAME] , Name2[MAX_PLAYER_NAME]; if(sscanf(params, "us", id, str2)) { SendClientMessage(playerid, 0xFF0000FF, "{ff0000}USAGE:/pm <id/name> <Message> return 1; } if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "{ff0000}ERROR: This Player Is Not Connected."); if(playerid != id) return SendClientMessage(playerid, 0xFF0000FF, "{ff0000}ERROR: You Cannot Send PM Message To Your Self."); { GetPlayerName(playerid, Name1, sizeof(Name1)); GetPlayerName(id, Name2, sizeof(Name2)); format(str, sizeof(str), "PM To %s (ID: %d): %s", Name2, id, str2); format(str, sizeof(str), "PM From %s (ID %d): %s", Name1, playerid, str2); SendCilentMessage(id, 0xFF0000FF, str); } return 1; }
Код:
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(340) : error 021: symbol already defined: "str" C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(341) : error 017: undefined symbol "str2" C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(343) : error 037: invalid string (possibly non-terminated string) C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(343) : error 017: undefined symbol "ff0000" C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(343) : warning 217: loose indentation C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(343) : error 029: invalid expression, assumed zero C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(343) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.