I've been scripting for a while now, and I've never needed to access a float that's inside the gamemode, from a filterscript.
I've never had a problem when I access integers.
(I use CallRemoteFunction)
This is just an example of course:
Maybe I'm doing something completely stupid and I'm not noticing it, but it's not working.
I tried debugging, and all it did is make me more confused:
What it prints out:
The only way I'm getting it to work is by using PVars..
I've never had a problem when I access integers.
(I use CallRemoteFunction)
This is just an example of course:
Code:
Gamemode:
public Float: GetPlayerHealthEx(playerid)
{
new Float: f;
GetPlayerHealth(playerid, f);
return f;
}
Filterscript:
CallRemoteFunction("GetPlayerHealthEx", "i", playerid);
I tried debugging, and all it did is make me more confused:
Code:
new
Float: test = 100.0,
Float: h = GetPlayerHealthEx(playerid);
printf("test: %f", test);
printf("h: %f", h);
if (test > h)
print("test > h");
Code:
test: 100.000000
h: 50.000000