#endif Prevents bugs?
#1

#endif Prevents bugs in the filterscripts?
delete my topic "endfile" I was confused.
Reply
#2

endif ends the code that is under a compiler if ( #if )
There is no magic word you can add to your code that prevents bugs
Reply
#3

Quote:
Originally Posted by PrO.GameR
View Post
endif ends the code that is under a compiler if ( #if )
There is no magic word you can add to your code that prevents bugs
soo it's help?
Reply
#4

Quote:
Originally Posted by PrO.GameR
View Post
endif ends the code that is under a compiler if ( #if )
There is no magic word you can add to your code that prevents bugs
thank you about the answer dear person
Reply
#5

Ypu might want to read this - https://sampwiki.blast.hk/wiki/Keywords: Directives
Reply
#6

Quote:
Originally Posted by Lordzy
View Post
I read, but thanks anyway dear person!
Reply
#7

Just saying, if this "fixes" your code, then you have problems with your code.
Reply
#8

Okay, now I understand what this is after being redirected here from your other thread.

#endif: This is a pre-compiler instruction. This is mainly used to determine what you want the compiler to compile at any given time. I use this quite frequently and so do others for example to set a build version to build:

pawn Code:
#if defined BUILD_0.3
//Command or function or whatever is in 0.3a which isn't in another build here
#endif
This essentially ends the question your asking the compiler, you haven't posted any code so you can't say that it means his code is broken as it almost certainly isn't. I'd assume he's using this to redefine a pre-defined function example:

pawn Code:
#if defined GivePlayerMoney
#undef GivePlayerMoney
#define GivePlayerMoney _Script_GivePlayerMoney
#endif
Removing end if here would give errors as you've just asked if a question but not told the compiler you done, it's like a return on a function don't have one? possibility for problems.

If the OP posts some code I can give them the precise reasons for the errors and tell them why it's there. If it's placed randomly look up for the other pre-compiler instructions.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)