[Floats] Problem I've been having... Partially Solved... Proper Solution Needed!
#1

Hello,

Ok, so I want to say this a simple as possible...

1. I made a plugin.
2. I send a few float values from the plugin to the gamemode.
3. I format a string in the gamemode to show the values, and make sure they're right.
4. I try it, and the values show correctly, and are what they are supposed to be.
5. I teleport to the location, and the screen goes white, as if you were EXTREMELY out of bounds( the Out of world boundary text shows also ).

Is there a known problem with sending floats from a plugin, to the gamemode.
I'm using a line similar to this in the gamemode:
Code:

SetPlayerPos(playerid,ReturnedValue(1,1),ReturnedV alue(1,2),ReturnedValue(1,3));


ReturnedValue takes two parameters, first one being the id of a array on the plugin, the second being the value of each array at that id.

Code:

static cell AMX_NATIVE_CALL n_ReturnedValue( AMX* amx, cell* params )
{
return FloatData[params[1]][params[2]];
}


That's the basics of the function in the plugin, and yes, I do use a valid id for the array, I do not pick a number greater or less than the array range.

Any help is appreciated,

Thanks,
Stephen

Partially Solved...
If I do this:

Code:
new convertstring[32];
format(convertstring,sizeof(convertstring),"%f",ReturnedValue(1,1))
new Float:WorkingValue = floatstr(convertstring);
It works, but I would like to figure out the proper way...

Thanks
Stephen
Reply


Messages In This Thread
[Floats] Problem I've been having... Partially Solved... Proper Solution Needed! - by XPlatform - 12.03.2009, 05:33
Re: [Floats] Problem I've been having... Partially Solved... Proper Solution Needed! - by ICECOLDKILLAK8 - 12.03.2009, 16:07
Re: [Floats] Problem I've been having... Partially Solved... Proper Solution Needed! - by XPlatform - 12.03.2009, 20:22

Forum Jump:


Users browsing this thread: 1 Guest(s)