Not calling function? - 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: Not calling function? (
/showthread.php?tid=665234)
Not calling function? -
DerickClark - 26.03.2019
It's not loading repair ids into the game.
or calling the function
Code:
public OnGameModeInit()
{
for(new i = 0; i != sizeof(ARepairPickups); i++)
ARepairPickups[i][PickupID] = -1;
mysql_tquery(MySQL, "SELECT * FROM `repair_pickups`", "OnLoadRepairPickups");
}
Code:
forward OnLoadRepairPickups(playerid);
public OnLoadRepairPickups()
{
new count;
cache_get_row_count(count); // Get total rows
for(new i; i < count; i++)
{
cache_get_value_name_int(i, "PickupID", ARepairPickups[i][PickupID]);
cache_get_value_float(i, "pux",ARepairPickups[i][pux]);
cache_get_value_float(i, "puy",ARepairPickups[i][puy]);
cache_get_value_float(i, "puz",ARepairPickups[i][puz]);
AddARepairPickups(ARepairPickups[i][pux],ARepairPickups[i][puy],ARepairPickups[i][puz]);
print("Test");
}
return 1;
}
Re: Not calling function? -
SymonClash - 26.03.2019
Show mysql.log
Re: Not calling function? -
DerickClark - 26.03.2019
It's now working, it was renamed to "repair_pickups" instead of "repair_system"
Re: Not calling function? -
raydx - 26.03.2019
cache_get_value_float
Shouldnt it be cache_get_value_name_float?