Raised This Month: $32 Target: $400
 8% 

[SOLVED] Array Question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 05-08-2012 , 15:54   [SOLVED] Array Question
Reply With Quote #1

Hello

Today, I'm looking to create an array with 'default value' (don't know how to say that in English ><)

I saw this post: http://forums.alliedmods.net/showthread.php?t=182348&

but I don't understand I tested this:

PHP Code:
enum AnEnum

    
AnEnum_FirstValue 5000,
    
AnEnum_SecondValue 6000,
    
AnEnum_ThirdValue 8000,
};

new 
g_var[AnEnum];

// ...


// in a test command:     
PrintToChatAll("test 2 first:%i second:%i third:%i",g_var[AnEnum_FirstValue],g_var[AnEnum_SecondValue],g_var[AnEnum_ThirdValue]); 
return:
test 2 first:0 second:0 third:0


how can can I return the value in the enum ? (5000,6000,8000) ?

thx
__________________
Sorry for my bad English, I'm Belgian

Last edited by Razmo51; 05-09-2012 at 10:37.
Razmo51 is offline
 


Thread Tools
Display Modes

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 01:22.


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