SA-MP Forums Archive
help | mysql. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help | mysql. (/showthread.php?tid=276673)



help | mysql. - EviLpRo - 14.08.2011

edit:

no matter..
i fixed the bug.


Re: help | mysql. - Scenario - 14.08.2011

See what this does for you:

pawn Код:
stock GetPlayerTag(playerid)
{
    new szResult[100], szQuery[300];
    format(szQuery, sizeof(szQuery), "SELECT `Tag` FROM `Users` WHERE `Nick` = '%s'", GetName(playerid));
    mysql_query(szQuery);
   
    if(mysql_num_rows() > 0)
        while(mysql_fetch_row_format(szResult, "|")) sscanf(szResult, "s[100]", szTag))
    else szTag = "NULL";
    return szTag;
}



Re: help | mysql. - EviLpRo - 14.08.2011

i not using with sscanf.


Re: help | mysql. - Scenario - 14.08.2011

You should of mentioned that earlier.