Thread
:
[TUT] The Use of Static Variables
View Single Post
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
06-27-2006 , 22:02 Re: The Use of Static Variables
#
6
Quote:
Originally Posted by
Orangutanz
I would imagine a better example would of been if using Forwards such as: PlayerPreThink, StartFrame, Touch etc
All of which are very demanding forwards, so a static would be handy to reduce overhead in the long term.
One annoying thing with static is that you cannot assign as you can with new, example:
Code:
new team = get_user_team(id) static team team = get_user_team(id)
Also I'm uncertain about this as well:
Code:
static team, player
Would player be a static or a new? I assume static but we all know how buggy the Pawn compiler is!
I'm pretty sure that in your last example they would both be static.
__________________
My GitHub
Hawk552
View Public Profile
Send a private message to Hawk552
Visit Hawk552's homepage!
Find More Posts by Hawk552