why? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: why? (
/showthread.php?tid=619440)
why? -
StR_MaRy - 17.10.2016
why i get this error ?
Код HTML:
server.pwn(10407) : warning 213: tag mismatch
Код HTML:
if(dialogid == DIALOG_FRIENDS)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, DIALOG_ADDFRIENDS, DIALOG_STYLE_INPUT, "Add friend", "Type ID of the player you want to add as a friend:", "Add Friend", "Exit");
}
if(listitem > 0)
{
new result[30],idd,status,title[50];
mysql_format(handle, gQuery, sizeof(gQuery), "SELECT `AName`, `ID`, `Status` FROM `players` WHERE `ID` = '%d'",Selected[playerid][listitem]);
new Cache: membresult = mysql_query(handle,gQuery);
for(new i, j = cache_get_row_count (); i != j; ++i)
{
cache_get_field_content(i, "aname", result); format(gQuery, 30, result);
idd = cache_get_field_content_int(i, "id");
status = cache_get_field_content_int(i, "Status");
Selected2[playerid] = idd;
if(status > 0)
{
format(title, sizeof(title), "[online] %s", gQuery);
}
else if(status == 0)
{
format(title, sizeof(title), "[offline] %s", gQuery);
}
}
cache_delete(membresult);
ShowPlayerDialog(playerid, DIALOG_FRIENDS2, DIALOG_STYLE_LIST, title, "Remove Friend\nView phone number", "Select", "Exit");
}
}
}
the line where i get that error
Код HTML:
mysql_format(handle, gQuery, sizeof(gQuery), "SELECT `AName`, `ID`, `Status` FROM `players` WHERE `ID` = '%d'",Selected[playerid][listitem]);
another example where is the same but works
Код HTML:
mysql_format(handle, gQuery, sizeof(gQuery), "SELECT `SenderID`, `Date`, `Text`, `Seen` FROM `emails` WHERE `ID` = '%d'", Selectat[listitem][playerid]);
Re: why? -
Misiur - 17.10.2016
In your working example your have "Selectat", in your not working one it's "Selected". You have both? Also you have swapped order from[listitem][playerid] to [playerid][listitem]