23.05.2014, 12:12
help how to fix?
Код:
warning 219: local variable "giveplayerid" shadows a variable at a preceding level
Код:
if(strcmp(cmd, "/bemutatkoz",true) == 0) { new giveplayerid; <<<WARNING! // if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, 0x33AA33AA, "(( /bemutatkoz [playerid] ))"); if(playerid == giveplayerid) return SendClientMessage(playerid, 0x33AA33AA, "(( Magadnak nem mutatkozhatsz be! ))"); new USER_FILE[64]; format(USER_FILE, sizeof(USER_FILE), "SFSUsers/%s.ini", GetPlayerNameEx(playerid)); if(DOF2_GetInt(USER_FILE, GetPlayerNameEx(giveplayerid)) == 1) return SendClientMessage(playerid, 0x33AA33AA, "(( Mбr ismeritek egymбst! ))"); new iStr[70]; format(iStr, sizeof(iStr), "(( Bemutatkozбs kйrelmet elkьldted neki: %s ))", GetPlayerNameEx(giveplayerid)); SendClientMessage(playerid, 0x33AA33AA, iStr); format(iStr, sizeof(iStr), "Ьdv! %s vagyok йs a barбtod szeretnйk lenni.\nElfogadod?", GetPlayerNameEx(playerid)); ShowPlayerDialog(giveplayerid, AMIGODIALOG, DIALOG_STYLE_MSGBOX, "Цn elfogadja?", iStr, "Igen", "Nem"); SetPVarInt(giveplayerid, "AmigoRequest", playerid); return 1; }