Could anyone tell me how to write an include script. whenever i try i get errors about not having a main or starting conditional. ive looked at the bioware includes and they certainly dont have these.
Am i missing a trick here?
Writing Include Files
Débuté par
Wannabeuk
, nov. 10 2009 04:51
#1
Posté 10 novembre 2009 - 04:51
#2
Posté 10 novembre 2009 - 05:55
Try putting all function prototypes at the beginning of the file.
ie:
if you have a function defined like this:
int sum (int a, int b, int c)
{
return a+b+c;
}
put the first line right at the top of the file so it would look something like this:
int sum (int a, int b, int c);
int sum (int a, int b, int c)
{
return a+b+c;
}
ie:
if you have a function defined like this:
int sum (int a, int b, int c)
{
return a+b+c;
}
put the first line right at the top of the file so it would look something like this:
int sum (int a, int b, int c);
int sum (int a, int b, int c)
{
return a+b+c;
}
Modifié par ChewyGumball, 10 novembre 2009 - 06:07 .
#3
Posté 10 novembre 2009 - 06:04
Also you don't compile include files independently...they won't compile on their own as you have seen. They get compiled when you compile all those scripts which use the library via a #include line.
#4
Posté 10 novembre 2009 - 02:43
Ah right, thanks guys i was worried because obviously it compiles the script everytime you save it and throws up that error.
Thanks for the assist
Thanks for the assist





Retour en haut






