Raised This Month: $ Target: $400
 0% 

[TF2][Help]Array or enum: which to use in my case?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 06-20-2016 , 09:21   Re: [TF2][Help]Array or enum: which to use in my case?
Reply With Quote #4

An enum is just a enumaration, which means it's assigning a string a number (Counting upwards from 0 as the word enumation implicates). In your exampel userid = 0, team = 1, class = 3 and so on. You don' need the enum. It just makes it easier to read the code.

The array is a way to store the informations (as you maybe know).

So to access a clients userid you could write
HTML Code:
userArray[client][userid]
or
HTML Code:
userArray[client][0]
that would be the same.
good_live is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode