SA-MP Forums Archive
enum question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: enum question (/showthread.php?tid=603217)



enum question - xTURBOx - 20.03.2016

do you include ";" after the enum or not?
eg:
PHP код:
enum E_PINFO
{
    
Pass,
    
tokens
}; 
OR

PHP код:
enum E_PINFO
{
    
Pass,
    
tokens

^^ without the ";"

It compiles both ways

which way it correct?


Re: enum question - MicroKyrr - 20.03.2016

Of course

PHP код:
enum E_PINFO 

    
Pass
    
tokens 




Re: enum question - itsCody - 20.03.2016

I guess it depends?
I don't usually include the ;


Re: enum question - MicroKyrr - 20.03.2016

Quote:
Originally Posted by itsCody
Посмотреть сообщение
I guess it depends?
I don't usually include the ;
I only include the ; like this

PHP код:
enum
{
    
DIALOG_LOGIN,
    
DIALOG_REGISTER
}; 
But when it comes to user data , vehicle data or more, I dOn't include the ;