R40 HELP!!!
#2

The problem appears to be your LoadHouses callback. Please check the syntax/parameters of cache_get_value_name_float, the first parameter is the row number, you are using houseid, this is likely resulting in the cache returning a non-existent row.

Instead of the first parameter being houseid it should be 0 as the row count will begin at 0.

You could also add a check to ensure that there is at least one row before selecting the value.
Код:
forward LoadHouses(houseid); 
public LoadHouses(houseid) 
{ 
	new numRows;
	cache_get_row_count(numRows);
	if(numRows == 0) return print("[MYSQL] MySQL returned no result for this query.");
	{
	    new Float:test; 
	    cache_get_value_name_float(0, "X", test); 
	    printf("%f", test); 
	}
}
MySQL R40 wiki:
https://sampwiki.blast.hk/wiki/MySQL/R40
Reply


Messages In This Thread
R40 HELP!!! - by Kraeror - 06.01.2018, 06:59
Re: R40 HELP!!! - by MEW273 - 06.01.2018, 07:35
Re: R40 HELP!!! - by Kraeror - 06.01.2018, 07:41
Re: R40 HELP!!! - by MEW273 - 06.01.2018, 07:44
Re: R40 HELP!!! - by Kraeror - 06.01.2018, 07:48
Re: R40 HELP!!! - by MEW273 - 06.01.2018, 07:52
Re: R40 HELP!!! - by Kraeror - 06.01.2018, 07:56
Re: R40 HELP!!! - by Kraeror - 06.01.2018, 07:59
Re: R40 HELP!!! - by MEW273 - 06.01.2018, 08:00
Re: R40 HELP!!! - by Kraeror - 06.01.2018, 08:03

Forum Jump:


Users browsing this thread: 1 Guest(s)