26.12.2008, 21:09
Quote:
|
Originally Posted by Bardokas
Dont use * instead fields name. Maybe it will help.
|

Also I correctly modify the a_sampmysql.inc where have been skipped navite samp_mysql_get_field (field [], value []);
Thanks!
But there is a new: if to use samp_mysql_get_field with different field names that it the server crash too

Код:
public LoadUser(userid,playerid)
{
new line[1024];
new field[32];
new tmp;
format(line, 128, "SELECT money, level, specID FROM users WHERE id='%d'", userid);
printf(line);
samp_mysql_query(line);
samp_mysql_store_result();
new rows=samp_mysql_num_rows();
if (rows==1)
{
samp_mysql_fetch_row(line);
samp_mysql_get_field("money",field);
tmp=strval(field);
PLAYERS[playerid][money]=tmp;
PLAYERS[playerid][moneytmp]=-1;
SetPlayerMoney(playerid,tmp);
samp_mysql_get_field("level",field);
tmp=strval(field);
PLAYERS[playerid][lev]=tmp;
samp_mysql_get_field("specID",field);
tmp=strval(field);
PLAYERS[playerid][specid]=tmp;
}

