15.05.2009, 21:46
Ok, back to this problem, but this time with Floats!
My Pawn native:
But.. what in the plugin? For example, this DOESN'T work:
I obviously want that the Pawn part, print "a=7.564, b=12.789"
I'm clueless, hoping someone know..
My Pawn native:
pawn Код:
native func(&Float:p1, &Float:p2);
//..
new Float:a, Float:b;
func(a, b);
printf("a=%f, b=%f", a, b);
But.. what in the plugin? For example, this DOESN'T work:
pawn Код:
static cell AMX_NATIVE_CALL n_func(AMX *amx, cell *params)
{
cell *cptr;
if (!amx_GetAddr(amx, params[1], &cptr))
*cptr = 7.564;
if (!amx_GetAddr(amx, params[2], &cptr))
*cptr = 12.789;
return 1;
}
I'm clueless, hoping someone know..