21.03.2013, 18:19
Hey guys, I've got the following code:
What I want is the value of x in _function2() (after it has been filled in _function() ofc).
It is not an option for me to return the value at the end of _function() so I can do newvar = _function().
How can I do that?
pawn Код:
new x; // on top of my script
...
public _function()
{
...
x = 11;
...
return true;
}
public _function2() return printf("%d", x); // returns 0 (like x is just initialised)
It is not an option for me to return the value at the end of _function() so I can do newvar = _function().
How can I do that?