unknown directive
#1

can somebody give me a brief explanation of what the error
"unknown directive" means ?

Because I have something like this

pawn Code:
#===============
And it gives the error unknown directive.
What I am trying to do is make a picture with the colour blue. so I tried
# (the define) thing but it gives a error, obviously.

Thanks
Reply
#2

Sorry for the bump but i've slept over it.
Anyone ?
Reply
#3

Any line starting with # is reserved for the compiler directives. The compiler directives are commands that tell the compiler to do a task.

You having the line "#===============" is telling the compiler to execute its internal "===============" command (directive). This command doesn't exist, hence "unknown directive".
Reply
#4

Quote:
Originally Posted by Simon
View Post
Any line starting with # is reserved for the compiler directives. The compiler directives are commands that tell the compiler to do a task.

You having the line "#===============" is telling the compiler to execute its internal "===============" command (directive). This command doesn't exist, hence "unknown directive".
Okay that explains much.
Thanks


But is there an alternative using that # to make blue.
Or should I just use comment lines instead?

Perhaps #define?
Reply
#5

As ****** said, you need to be clearer with your request. I'm under the assumption that you're trying to put blue colours in your source code to beautify it?

The blue colour is only an effect created by your editor (assuming you're using Pawno)-- really it's just plain text that's been coloured by your editor. It's not worth putting effort into colouring your code, it will vary from editor to editor and could create unintended side effects (if you manage to hack together a solution).

Stick with comments if you need a bit of colour to improve readability, but don't go to far or else you could decrease readability of your code. You may regret spending time creating some cool coloured art when you have to waste your time scrolling past it everytime you open your script.
Reply
#6

#define pattern must start with an alphabetic character
Reply
#7

Quote:
Originally Posted by [RonaldO]
View Post
#define pattern must start with an alphabetic character
This, you won't be able to do:
pawn Code:
#define ============
Just use comment lines instead:
pawn Code:
//============
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)