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; }
if(strcmp(cmd, "/bemutatkoz",true) == 0)
{
new guyid; <<<WARNING!
// if(sscanf(params, "u", guyid)) return SendClientMessage(playerid, 0x33AA33AA, "(( /bemutatkoz [playerid] ))");
if(playerid == guyid) 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(guyid)) == 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(guyid));
SendClientMessage(playerid, 0x33AA33AA, iStr);
format(iStr, sizeof(iStr), "Udv! %s vagyok йs a bar?tod szeretnйk lenni.\nElfogadod?", GetPlayerNameEx(playerid));
ShowPlayerDialog(guyid, AMIGODIALOG, DIALOG_STYLE_MSGBOX, "?n elfogadja?", iStr, "Igen", "Nem");
SetPVarInt(guyid, "AmigoRequest", playerid);
return 1;
}
error 035: argument type mismatch (argument 1) if(sscanf(params, "u", giveplayeride)) return SendClientMessage(playerid, 0x33AA33AA, "(( /bemutatkoz [playerid] ))");
if(sscanf(params, "u", guyid)) return SendClientMessage(playerid, 0x33AA33AA, "(( /bemutatkoz [playerid] ))");
Change it to the new variable you have declared however it is , or show me your command.
pawn Код:
|
if(strcmp(cmd, "/bemutatkoz",true) == 0) { new giveplayeride; if(sscanf(params, "u", giveplayeride)) return SendClientMessage(playerid, 0x33AA33AA, "(( /bemutatkoz [playerid] ))"); if(playerid == giveplayeride) 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(giveplayeride)) == 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(giveplayeride)); SendClientMessage(playerid, 0x33AA33AA, iStr); format(iStr, sizeof(iStr), "Ьdv! %s vagyok йs a barбtod szeretnйk lenni.\nElfogadod?", GetPlayerNameEx(playerid)); ShowPlayerDialog(giveplayeride, AMIGODIALOG, DIALOG_STYLE_MSGBOX, "Цn elfogadja?", iStr, "Igen", "Nem"); SetPVarInt(giveplayeride, "AmigoRequest", playerid); return 1; }
new guyid;
if(sscanf(params, "u", guyid)) return SendClientMessage(playerid, 0x33AA33AA, "(( /bemutatkoz [playerid] ))");
if(sscanf(cmdtext, "u", giveplayeride)) return SendClientMessage(playerid, 0x33AA33AA, "(( /bemutatkoz [playerid] ))");
if(sscanf(cmd, "u", giveplayeride)) return SendClientMessage(playerid, 0x33AA33AA, "(( /bemutatkoz [playerid] ))");