Passing a variable by reference using SetTimerEx
#1

So I'm trying to pass a variable by reference to a function using SetTimerEx and I'm just getting a messy result.
I cannot find where I fucked up and I searched about this and didn't find a thing, Help?

PHP код:
new TEST = 5;
forward decrease(&n);
public 
decrease(&n)
{
    
printf("%i", n);
}
public 
OnGameModeInit()
{
    
SetTimerEx("decrease", 1000, true, "i", TEST);
    return 
1;
} 
Console:
PHP код:
[22:19:20] 33554432
[22:19:21] 33554432
[22:19:22] 33554432
[22:19:23] 33554432
[22:19:24] 33554432
[22:19:26] 33554432
[22:19:27] 33554432
[22:19:28] 33554432
[22:19:29] 33554432
[22:19:30] 33554432
[22:19:31] 33554432
[22:19:32] 33554432
[22:19:33] 33554432 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)