03.09.2015, 10:43
what is the problem in this?
and i get this warrings
Код:
if (strcmp(string, "/setrank", true) == 0) { if (orgleader[playerid] == 0) return SendClientMessage2(playerid, COLOR_WHITE, "Error: You aren't the (co)leader of an organization."); new ID, rank[28]; tmp = strtok(cmdtext, idx); if (!strlen(tmp)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /setrank [playerid] [rank]"); if (strlen(rank) > 28) return SendClientMessage(playerid, 0xFF0000FF,"The maximum rank length is 28 characters!"); if (!IsPlayerConnected(ID)) return 1; if (GetPVarInt(giveplayerid, "playerorg") != GetPVarInt(playerid, "playerorg")) return SendPlayerFormattedText(playerid, COLOR_RED, "%s is not in your organization!", giveplayer, ""); new string[120]; format(string,sizeof(string),"Your leader %s has given you a rank: '%s'", PlayerName(playerid), rank); SendClientMessage(ID, 0xFFFF00FF, string); format(string,sizeof(string),"You have given a rank to %s (%s)", PlayerName(playerid), rank); SendClientMessage(playerid, 0xFFFF00FF, string); return 1; }
Код:
C:\Users\Nidhal\Desktop\moi\server\gamemodes\bb_freeroam.pwn(15733) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Nidhal\Desktop\moi\server\gamemodes\bb_freeroam.pwn(15734) : error 017: undefined symbol "PlayerName" C:\Users\Nidhal\Desktop\moi\server\gamemodes\bb_freeroam.pwn(15736) : error 017: undefined symbol "PlayerName" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase