Posts: 108
Threads: 21
Joined: Aug 2016
How do i call a callback in another callback? what should i use?
Posts: 3,324
Threads: 96
Joined: Sep 2013
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?
Posts: 108
Threads: 21
Joined: Aug 2016
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
Posts: 108
Threads: 21
Joined: Aug 2016
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(playerid, CLASS_SWAT);
return 1;
}
|
Tag Mismatch.
Posts: 108
Threads: 21
Joined: Aug 2016
Quote:
Originally Posted by Dayrion
Because your classid isn't a integer.
|
Notice but still doesn't work
Код:
OnPlayerRequestClass(playerid, 270);