Hook/Local?
#1

How do i call a callback in another callback? what should i use?
Reply
#2

Perhaps you should explain a bit more... This is valid:

pawn Код:
public callback1() {
    return 72;
}
public callback2() {
    callback1();
    return 1;
}
In that, I called callback1 in callback2. I assume this is what you mean?
Reply
#3

Quote:
Originally Posted by Crayder
Посмотреть сообщение
Perhaps you should explain a bit more... This is valid:

pawn Код:
public callback1() {
    return 72;
}
public callback2() {
    callback1();
    return 1;
}
In that, I called callback1 in callback2. I assume this is what you mean?
Yes. but when i call for example
Код:
public OnPlayerRequestClass(playerid, classid)
in another callback it says undefine symbol classid i'm trying to use it with the classid thats why
Reply
#4

Show your code.
If you want to call OnPlayerRequestClass in another callback, this might be (example):
PHP код:

public randomcall(playerid)
{
    
blabla
    OnPlayerRequestClass
(playeridCLASS_SWAT);
    return 
1;

Reply
#5

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Show your code.
If you want to call OnPlayerRequestClass in another callback, this might be (example):
PHP код:

public randomcall(playerid)
{
    
blabla
    OnPlayerRequestClass
(playeridCLASS_SWAT);
    return 
1;

Tag Mismatch.
Reply
#6

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Show your code.
Because your classid isn't a integer.
Reply
#7

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Because your classid isn't a integer.
Notice but still doesn't work

Код:
OnPlayerRequestClass(playerid, 270);
Reply
#8

Show the whole code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)