Hya chaps
Is it possible to send a timer to a class function?
I keep getting the error "The given timer callback does not exist."
here is what I have been putting....
blah <- NewTimer( "MyClass.MyClassFunction", 50, 0, player );
that's for your help...
rulk
Simple answer... Nope!
I don't want to get into details because there's no point in doing so.
Quote from: S.L.C on Sep 13, 2015, 05:34 PMSimple answer... Nope!
I don't want to get into details because there's no point in doing so.
ok, thanks chap
Lock if fixed?
You can make a function NewClassTimer which calls on another function with vargv and insert and acall which calls on another function and passes the function to call and does compilestring and executes it..
Quote from: NE.CrystalBlue on Sep 14, 2015, 02:40 PMYou can make a function NewClassTimer which calls on another function with vargv and insert and acall which calls on another function and passes the function to call and does compilestring and executes it..
You make no sense mate.
He's basically saying you can make another function that will call the classes function.
Quote from: Thijn on Sep 14, 2015, 05:47 PMHe's basically saying you can make another function that will call the classes function.
You'd still miss the object instance (`this (http://forum.vc-mp.org/?topic=861.msg5558#msg5558)` environment) and calling the function normally would be the same as:
class Test
{
function Wazzaa(str)
{
::print("class " + str);
}
}
Test_Wazzaa <- Test.Wazzaa;
Timer <- NewTimer( "Test_Wazzaa", 50, 0, "wazzaaa" );
A small update (http://forum.vc-mp.org/?topic=1487.0) to the request of this topic.