Aller au contenu

Photo

custom include script not compiling but also not returning compilation error(Resolved in the most embarassing way possible)


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
When I try to compile my custom include script, I don't get a compilation successful message and I also don't get any error messages either.  Just a blank grey box.  One of my scripts that uses one of the functions has stopped working and I suspect that there is an error in my include script. 

Modifié par M. Rieder, 20 avril 2012 - 02:02 .


#2
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
include scripts don't really compile because they don't have a 'main' function. Try recompiling the script that uses the include, and look in there for your error messages.

#3
kevL

kevL
  • Members
  • 4 078 messages
or try this proTip

at the very bottom, and i mean very bottom of the #include, put:

void main(){}


this fools the compiler into thinking you want to compile an actual runtime script, forcing it to parse out yer functs

Note. you'll get a corresponding .Ncs file of 1kb that does nothing (delete it, Carefully )


the above line will have to be removed or commented out, when the real script is ready to be compiled later, as so

//void main(){}


#4
kamal_

kamal_
  • Members
  • 5 261 messages
Normally you can compile include scripts, but compiling the include does not find all the errors, you have to compile a script that calls it. At least that's been my experience working with the commoner ai.

#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I finally figured out the problem. Not the script at all. Put the script on the wrong event! How embarassing!

#6
Morbane

Morbane
  • Members
  • 1 883 messages
heh - I've done that before - palm->face time.....