General > Developers Corner
Variables in timer functions
JamminR:
I'm reasonably sure that it remembers because it's filled in when it runs.
Have you tried it? Do you get a null error?
If it doesn't work, try a simple bracket precedence.
See if using parenthesis around the var v makes it 'fill' before being run and 'remembered'
AntiHighPing.CheckPlayer( ( v ) )
Or, you just inserted it into a table...
Does anything else modify that table?
If not, you could, in theory, use;
AntiHighPing.CheckPlayer( AntiHighPing.HighPingPlayers.num )
If you can get v to work, it would be more efficient however. Tables are almost always more costly in the long run.
FYI - There's a discussion on this at Facepunch. My Google-Fu found it.
What you're trying to do, that iViscosity stated, should work, because v is set outside the timer create.
https://facepunch.com/showthread.php?t=1548817&p=51677181
captain1342:
Hadn't time to try it yet, I will test it tomorrow, thanks guys.
Navigation
[0] Message Index
[*] Previous page
Go to full version