how to compile include
#1

Hey.
Ive been searching all over ****** but I cant find answer to my question. How do I compile a include file for SAMP? if I just paste it in pawno, it gives me weird errors, probabbly because pawno is ment for amx. Any program? Thank you.
Reply
#2

Yes - you do not compile includes. Do you even know what an include is? I'll try and explain it to you.

pawn Код:
This is your INCLUDE FILE:
stock RandomFunc(randarg)
{
//random shizzle
return something;
}
// now here ends your inc.

// let's say you put it something like:

main()
{
return 1;
}
#include <yourinclude>

// now this is the same as doing:

main()
{
return 1;
}

stock RandomFunc(randarg)
{
//random shizzle
return something;
}

// the compiler basically reads it that way, he, let's say, unifies the two codes.
Hope it helped.
Reply
#3

Hey. Thanks for fast response. Im not sure I quite understand. The includes I have so file are only added by doing something like
Код:
#include myfile
But with what I see in your code it looks much more complicated than what I am used to. To be exact, I wanted to use this include http://pastebin.com/f68e1a6ad
So, any quick hint on how to compile it? I apologize for my bad understandings. Thanks for your effort and rep++ for respoding. Thanks
Reply
#4

Include files needn't be compiled. They are included (get it?) when you compile your main script.
Reply
#5

You don't need to compile it. Make a new file with the .inc extension and put the text in it then leave it in the pawno\includes folder. Open your GM and add #include <yourinclude> on top.
Reply
#6

Oh, so can I create the new file just in notepad and save the extension as .inc?
Reply
#7

Yes.
Reply
#8

Thank you so much. Both of you. Really! Thanks!
Reply
#9

Don't need to compile your includes. Just create a new .inc file and start writing code inside it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)