Callback problems
#9

me too
i got a little probleme
i tried this in my plugin
Код:
	int clients = 2;
	if(amx_FindPublic(amx, "OnClientConnect", &clients) == AMX_ERR_NONE)
	{
		amx_Push(amx, clients);
		amx_Exec(amx, &amx_ret, clients);
		amx_Release(amx, amx_addr);
		
	}
	else
	{
		logprintf("there is a probleme");
	}
	return 1;
my function looks good
now this is my pawn code
pawn Код:
}

public OnRconCommand(cmd[])
{

    if(strcmp(cmd, "test", true) == 0)
    {
      Test();
       
      return 1;
    }
    return 1;
}

public OnClientConnect(clients)
{
    printf("%d clients", clients);
    if(clients == 1)
    {
      printf("the first client");
    }
    else if(clients == 2)
    {
      print("the second one");
    }
   
}
ok my function is Test()
and it calls the callback "OnClientConnect(clients)"
so clients must be 2 as you see here "int clients = 2;"
but it always print "22 clients" for me even if i change "int clients = 3;"
what is the probleme here ?
thx
Reply


Messages In This Thread
Callback problems - by joco96 - 28.08.2009, 06:57
Re: Callback problems - by Marcus09 - 28.08.2009, 10:50
Re: Callback problems - by Correlli - 28.08.2009, 10:51
Re: Callback problems - by joco96 - 29.08.2009, 14:33
Re: Callback problems - by Incognito - 29.08.2009, 17:51
Re: Callback problems - by joco96 - 30.08.2009, 08:58
Re: Callback problems - by XPlatform - 30.08.2009, 16:04
Re: Callback problems - by joco96 - 30.08.2009, 19:40
Re: Callback problems - by Tony_Montana - 10.11.2009, 10:33
Re: Callback problems - by toby` - 20.02.2010, 21:16

Forum Jump:


Users browsing this thread: 1 Guest(s)