[Help] Mysql Error
#1

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)