Compilation errors?

Users who are viewing this thread

theman007

Regular
COMPILATION SUCCESSFUL.

The following errors were generated during compilation:
  try/end operations do not match in script.cf_agent_deploy_pavise: 2 try_end(s) extra
  try/end operations do not match in script.cf_agent_recover_pavise: 1 try_end(s) extra
  try/end operations do not match in script.cf_agent_is_behind_pavise: 1 try_end(s) extra


I get this error when compiling unedited source with the provided compile.bat

Does anyone know what this means?
 
This may be caused by either the compiler or the code. There are some lines that seem perfectly fine to me, but not to the compiler. The mod compiles fine, as long as you get the COMPILATION SUCCESSFUL message, so pay no mind to that. However, if you get other warnings, you need, or should resolve them.
 
It is harmless.  That is the result of the compiler and WSE not sharing all of the same "opcodes" (the scripting commands the module system uses).  WSE has a "try_for_agents" loop of its own type that focuses on a specific area of the battlefield (vs. every agent on the field) that PBOD (the Pre-Battle Orders & Deployment mod) makes use of.  The compiler ignores that initial "try_for_agents" loop command, but sees the native Warband "try_end" so it thinks there is one too many.
 
theman007 said:
  try/end operations do not match in script.cf_agent_is_behind_pavise: 1 try_end(s) extra

are you using WRECK? From the error message and your comment (compiler.bat) that looks like the case

if so the replies above are incorrect. WRECK has a syntax check that results in warnings if detects potential issues with your code. Read the message above
try/end operations
-> (try_for_XXXXXX) operations like (try_for_range) or (try_for_agents)
do not match
--> syntax rule. Each new block needs to have a end (close) operation

Code:
(try_for_range),
  .... # stuff here
(try_end),

That warning means what it says: somewhere you have a bug by missing close statements

in script.cf_agent_is_behind_pavise:
-> this is the code with the bug. Its a script, so look for it at module_scripts.py. Name is "cf_agent_is_behind_pavise"

1 try_end(s) extra
-> how many are missing/or extras (shouldn't be there)

How to fix it?
1) Find the script
2) Fix the indentation. That way its easier to find the mistake
3) Add the (try_end), or remove it (if the error was saying you have too many of them) in the correct place
 
Windyplains said:
It is harmless.  That is the result of the compiler and WSE not sharing all of the same "opcodes" (the scripting commands the module system uses).  WSE has a "try_for_agents" loop of its own type that focuses on a specific area of the battlefield (vs. every agent on the field) that PBOD (the Pre-Battle Orders & Deployment mod) makes use of.  The compiler ignores that initial "try_for_agents" loop command, but sees the native Warband "try_end" so it thinks there is one too many.
That. Actually, it would be perhaps sensible to fix the compiler. I'll take a look.

EDIT: Fixed it. Actually, it was try_for_prop_instances. Compiler didn't consider it a depth operation. Now it does. It may or may not  break everything.
 
Back
Top Bottom