Raised This Month: $ Target: $400
 0% 

[REQ] Static Enums


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 04-05-2014 , 08:15   Re: [REQ] Static Enums
Reply With Quote #7

Quote:
Originally Posted by souvikdas95 View Post
Uhm... Suppose I want to reuse the symbols in that enum in another function but I don't want to use that same enum or redeclaring it as many times as the function is called. So, how do I do that?
Making it global returns compilation errors saying symbol already declared or so...
This is the right section for this kind of post.
It's because you're trying to declare something twice. If you would've shown the real code and the real error we would be able to help you. Without that I can only tell you to change the variable names of/in the enum.
Neither of these are ok:
Code:
new Test1 enum Test1 {     Whatever } new Test2 enum Whatever2 {     Test2 }

Code:
N:\Nerladdat\! Spel\CS\! Scripting\Rose\test4.sma(4) : error 021: symbol already defined: "Test1"
N:\Nerladdat\! Spel\CS\! Scripting\Rose\test4.sma(11) : error 021: symbol already defined: "Test2"
__________________

Last edited by Black Rose; 04-05-2014 at 08:15.
Black Rose 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 05:57.


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