db_get_field_assoc server crash.
#2

You are using db_get_field_assoc wrong. You need to store the value it gives you in a string and then use floatstr or strval.

So if you want to load an integer:

Код:
new temp[32], myInt;
db_get_field_assoc(Result, "myInt", temp, sizeof(temp));
myInt = strval(temp);
For floats:

Код:
new temp[32], Float:myFloat;
db_get_field_assoc(Result, "myFloat", temp, sizeof(temp));
myFloat = floatstr(temp);
Reply


Messages In This Thread
db_get_field_assoc server crash. - by Ahmad45123 - 05.10.2014, 18:51
Re: db_get_field_assoc server crash. - by Chenko - 05.10.2014, 21:44
Re: db_get_field_assoc server crash. - by Ahmad45123 - 05.10.2014, 21:49
Re: db_get_field_assoc server crash. - by Ahmad45123 - 05.10.2014, 22:01

Forum Jump:


Users browsing this thread: 1 Guest(s)