error 035: argument type mismatch (argument 2) warning 204: symbol is assigned a value that is never used: "ip" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
switch(dialogid) { case LoginDialog: { if(!response) Kick(playerid); new hashpass[129], query[100], string[100]; WP_Hash(hashpass, sizeof(hashpass), inputtext); new ip[16]; GetPlayerIp(playerid, IP[playerid], 16); if (!strcmp(IP[playerid], 16, true)) { mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", Name[playerid]); mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid); } else if(!strcmp(hashpass, PlayerInfo[playerid][Password])) { mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", Name[playerid]); mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid); } else { GetPlayerName(playerid, Name[playerid], 24); format(string, sizeof string, "Welcome %s!\nYour account has been found in our database. Please fill in your password:", Name[playerid]); ShowPlayerDialog(playerid, LoginDialog, DIALOG_STYLE_INPUT, "Welcome to Server", string, "Login", "Leave"); SendClientMessage(playerid, -1, "{FF0000}Wrong Password, Please Try Again!"); } }
if (!strcmp(IP[playerid], 16, true))
new ip[16];
Код:
if (!strcmp(IP[playerid], 16, true)) strcmp(const string1[], const string2[], bool:ignorecase=false, length=cellmax) and also remove this code Код:
new ip[16]; |
GetPlayerIp(playerid, IP[playerid], 16); GetPlayerName(playerid, Name[playerid], 24); if(!strcmp(IP[playerid], IP[playerid])) { mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", Name[playerid]); mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid); } else if(!strcmp(hashpass, PlayerInfo[playerid][Password])) { mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", Name[playerid]); mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid); }
new ip[16];
GetPlayerIp(playerid, IP[playerid], 16);
GetPlayerIp(playerid,ip,16);
If you declared this:
Код:
new ip[16]; Код:
GetPlayerIp(playerid, IP[playerid], 16); Also, why did you put [playerid] on side of it? It should be: Код:
GetPlayerIp(playerid,ip,16); Please, read some documentation and try to figure out your own problems, you have 1,547 posts yet you can't solve a simple warning by yourself? You need to put effort into it. |
static Name[MAX_PLAYERS][24], IP[MAX_PLAYERS][16];
(1758) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
if (!strcmp(IP[playerid], 16, true))
I edited my previous post, but as you've read it already i'll post it in here.
[EDIT] Also also: Код:
if (!strcmp(IP[playerid], 16, true)) Strcmp (string compare) is used to compare two strings. Please read this documentation : https://sampwiki.blast.hk/wiki/Strcmp and try to fix that line of code by yourself, if you have any more questions keep asking only after you have read that. |
if (!strcmp(IP[playerid], 16, true))
if (!strcmp(IP[playerid], string, true)) { mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", Name[playerid]); mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid); } else if(!strcmp(hashpass, PlayerInfo[playerid][Password])) { mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", Name[playerid]); mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid); }
if (!strcmp(IP[playerid], string, true))