[REQ] Static Enums
Can AmxModX introduce support for static enums like :
Code:
public client_putinserver ( id ) |
Re: [REQ] Static Enums
Make global?
|
Re: [REQ] Static Enums
Don't XY, explain what your trying to do.
|
Re: [REQ] Static Enums
+ I'm not sure why you're even 'requesting' something in "Scripting section". You know perfectly that's not the right place. But yes, explain yourself, you could just make the enum global.
|
Re: [REQ] Static Enums
The compiler seems to be fine with function-scope enumerations, though I'm curious whether they're initialized on startup or when the function is called.
|
Re: [REQ] Static Enums
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... @Arkshine - I have some problems with understanding where to post what :P Can you shift this thread to the required section? |
Re: [REQ] Static Enums
Quote:
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:
Code:
N:\Nerladdat\! Spel\CS\! Scripting\Rose\test4.sma(4) : error 021: symbol already defined: "Test1" |
Re: [REQ] Static Enums
hmm... so my request is valid right?
Code:
function() |
Re: [REQ] Static Enums
Nope. Make the enum global. You don't have to make the DATA global though. But the difference between global and static is none I believe.
|
Re: [REQ] Static Enums
Quote:
|
| All times are GMT -4. The time now is 05:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.