View Single Post
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-27-2006 , 22:02   Re: The Use of Static Variables
Reply With Quote #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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552