[Help] Mysql Error - 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: [Help] Mysql Error (
/showthread.php?tid=303238)
[Help] Mysql Error -
tony_fitto - 12.12.2011
Hey guys
Just changed mysql plugin to BlueG's mysql plugin.
I'm quite new at mysql and I asked for help before to explain how I should load init's, floats and strings from my DB.
Well I got this
pawn Код:
new Query[128];
format(Query, sizeof(Query), "SELECT * FROM `accounts` WHERE `UserID` = '%d'", DatabaseID[playerid]);
mysql_query(Query);
mysql_store_result();
if(mysql_retrieve_row()) //data was retrieved
{
//Ints:
mysql_fetch_field("pLevel", Query);
PlayerInfo[playerid][pLevel] = strval(Query);
//Floats:
mysql_fetch_field("pHealth", Query);
PlayerInfo[playerid][pHealth] = floatstr(Query);
//Strings:
mysql_fetch_field("pKey", PlayerInfo[playerid][pKey]);
}
mysql_free_result(); //do not forget this, or you will run into trouble ;)
But i got errors, so I belive it didn't work.
I get this error on each mysql_fetch_field some how.
Quote:
error 035: argument type mismatch (argument 1)
|
-if anyone can find a problem would I be really gratefull for everything.