Referenced parameters?
#11

Ok, back to this problem, but this time with Floats!

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 obviously want that the Pawn part, print "a=7.564, b=12.789"

I'm clueless, hoping someone know..
Reply


Messages In This Thread
Referenced parameters? - by yom - 18.01.2009, 21:54
Re: Referenced parameters? - by Donny_k - 18.01.2009, 22:52
Re: Referenced parameters? - by yom - 18.01.2009, 23:19
Re: Referenced parameters? - by yom - 19.01.2009, 16:07
Re: Referenced parameters? - by rafay - 19.01.2009, 16:17
Re: Referenced parameters? - by kc - 19.01.2009, 16:18
Re: Referenced parameters? - by rafay - 19.01.2009, 16:20
Re: Referenced parameters? - by yom - 19.01.2009, 16:28
Re: Referenced parameters? - by kc - 19.01.2009, 16:30
Re: Referenced parameters? - by Antironix - 19.01.2009, 17:18
Re: Referenced parameters? - by yom - 15.05.2009, 21:46
Re: Referenced parameters? - by ICECOLDKILLAK8 - 15.05.2009, 22:12
Re: Referenced parameters? - by yom - 15.05.2009, 22:38
Re: Referenced parameters? - by ICECOLDKILLAK8 - 16.05.2009, 10:13
Re: Referenced parameters? - by yom - 16.05.2009, 12:38
Re: Referenced parameters? - by yom - 22.11.2009, 18:41

Forum Jump:


Users browsing this thread: 6 Guest(s)