I have a few scripts that I'm using as includes. Just like utility_h or wrappers_h, all that they contain are functions that are designed to be called from other scripts.
Yet every time I compile them, I get a nasty error saying "Script must contain either a main or StartingConditional" and a "Compile failed" message. However, utility_h, wrappers_h or any number of similar scripts written by BioWare have no main or StartingConditional. Why can't we do this as well?
Is there any fix for this problem, or is the script actually compiling and the error is wrong?
main or StartingConditional required?
Débuté par
AmstradHero
, mai 08 2010 02:01
#1
Posté 08 mai 2010 - 02:01
#2
Posté 08 mai 2010 - 02:48
That is not an issue at all. You can ignore the warning and go ahead.
#3
Posté 08 mai 2010 - 03:22
IIRC compiling the including script will compile any includes as well (at which point you won't see the main or starting conditional error, since your including script will have one). So as Timelord says it's no problem.
#4
Posté 08 mai 2010 - 07:12
Guess I'll just happily ignore those errors then, as disconcerting as that is. It just seems wrong that every export pulls up errors due to things that don't export (e.g. characters or area lists) scripts that "don't compile" or other issues.
Modifié par AmstradHero, 08 mai 2010 - 07:13 .
#5
Posté 08 mai 2010 - 08:46
In general that is a challenge for us, but in this specific case includes aren't really supposed to be standalone compiled scripts, they're supposed to be compiled as part of their including script.
Since the compiler has no way of knowing it's dealing with a script fragment intended to be included, this is probably the correct behaviour.
Since the compiler has no way of knowing it's dealing with a script fragment intended to be included, this is probably the correct behaviour.
#6
Posté 08 mai 2010 - 03:05
AmstradHero wrote...
Guess I'll just happily ignore those errors then, as disconcerting as that is. It just seems wrong that every export pulls up errors due to things that don't export (e.g. characters or area lists) scripts that "don't compile" or other issues.
You should only get that error when saving (which compiles the script automitically) - not if you are doing an export...(right guys?) If things are not exporting, that's something else...
#7
Posté 08 mai 2010 - 04:27
Yes, the error should occur only while compiling, not while exporting.
If you want to suppress these messages, you can set the Auto Compile on Save option in the Script Editor Options to False. That would mean you have to manually compile all your scripts though.
If you want to suppress these messages, you can set the Auto Compile on Save option in the Script Editor Options to False. That would mean you have to manually compile all your scripts though.
#8
Posté 09 mai 2010 - 06:07
Quite right. I was getting my errors mixed up in the small log window. It seems the best way to work is to have a dummy main function in while creating the include script to pick up any compile errors/typos you might have, then remove it before compiling the scripts that reference it.
That said, I have found that characters and area lists don't export, and always report "Unable to locate an exporter or resource information for object type:chr" (that's characters).
That said, I have found that characters and area lists don't export, and always report "Unable to locate an exporter or resource information for object type:chr" (that's characters).
#9
Posté 09 mai 2010 - 06:51
Characters don't serve any purpose within the game - Character. They are there only for giving some definition to the different creatures, primarily for voice-over and coordination; perhaps they didn't include the exporter for the character with the toolset released to us?





Retour en haut






