[Help] #define | FS - gamemode
#6

#define does not act like a normal variable

Once you #define something it is present in the whole documnet until you use #undef.
This is your problem:

PHP код:
public OnFilterScriptInit()
{
    
#define teszt
    //here you defined it
    
return 1;
}
public 
OnFilterScriptExit()
{
        
//if you do a check here teszt is defined at this line
    #undef teszt
       // after this line you no longer can use teszt because there is no longer defined
    
return 1;
}
CMD:teszt(playeridparams[])
{
       
//this doesn't work because testz was undefined.
    #if defined teszt
        
Msg(playerid"Work");
    
#else
        
Msg(playerid"Don't work");
    
#endif
    
return 1;

Read more here: https://sampforum.blast.hk/showthread.php?tid=570933
I know it is a lot to read, but at least try to read the first few paragraphs.
Reply


Messages In This Thread
[Help] #define | FS - gamemode - by Hend - 07.03.2018, 08:43
Re: [Help] #define | FS - gamemode - by MrThomas - 07.03.2018, 08:44
Re: [Help] #define | FS - gamemode - by Hend - 07.03.2018, 08:51
Re: [Help] #define | FS - gamemode - by Dayrion - 07.03.2018, 09:56
Re: [Help] #define | FS - gamemode - by Hend - 07.03.2018, 09:59
Re: [Help] #define | FS - gamemode - by GaByM - 07.03.2018, 10:33
Re: [Help] #define | FS - gamemode - by jasperschellekens - 07.03.2018, 11:05
Re: [Help] #define | FS - gamemode - by Hend - 07.03.2018, 14:13
Re: [Help] #define | FS - gamemode - by GaByM - 07.03.2018, 14:36
Re: [Help] #define | FS - gamemode - by RedFusion - 07.03.2018, 15:52

Forum Jump:


Users browsing this thread: 1 Guest(s)