21.08.2014, 17:13
(
Последний раз редактировалось S4t3K; 21.08.2014 в 18:23.
)
Hi.
I was kinda bored today so I decided to challenge myself in something pretty hard.
It will be most likely useless but all I want is to know how to do.
The point is simple : I create an array, I put it as parameter of a function called "store", and in this function, I will put some function which return a number (float or integer). Each number returned will fill the lowest empty cell of the array.
If it's still blur to you, read this small code :
So the point would be to store 2048 in the cell 0 of the array, 0 in the cell 1 and the timerid in the cell 2.
Question : how to catch the returned values by the instructions between brackets ? I know ****** did it in y_inline, but I'm just interested in "how".
Thanks to the persons who'll be able to answer me.
PS : I know I'll most likely have to use #emit but this is a very large domain and thus telling me "using #emit" would just be a vague answer.
I was kinda bored today so I decided to challenge myself in something pretty hard.
It will be most likely useless but all I want is to know how to do.
The point is simple : I create an array, I put it as parameter of a function called "store", and in this function, I will put some function which return a number (float or integer). Each number returned will fill the lowest empty cell of the array.
If it's still blur to you, read this small code :
pawn Код:
new array[3];
forward myCallback();
store(array)
{
strval("2048"); // will return 2048
CreateObject(18, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0); // will most likely return 0
SetTimer("myCallback", 1500, false); // will return a timerid
}
Question : how to catch the returned values by the instructions between brackets ? I know ****** did it in y_inline, but I'm just interested in "how".
Thanks to the persons who'll be able to answer me.
PS : I know I'll most likely have to use #emit but this is a very large domain and thus telling me "using #emit" would just be a vague answer.