can someone please explain me that weird error?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
can someone please explain me that weird error?
Sorry that I need help that often, but now something I´d never find out.
I get following error message (in own words and translated, but true):
There is left to say that line 31 in Scout.cfg is a path to the scenarios folder,
line 9 of the file landing.cfg is a use of the predefined macro {VARIABLE_OP VAR OP ARG}.
With '...' other places where it appears are meant

I get following error message (in own words and translated, but true):
Code: Select all
missing tag close for [set_variable] in data/game.cfg:94 taken over from data/game.cfg taken over from scenarios/landing.cfg:9 taken over Scout.cfg:31, ...
line 9 of the file landing.cfg is a use of the predefined macro {VARIABLE_OP VAR OP ARG}.
With '...' other places where it appears are meant

First read, then think. Read again, think again. And then post!
Look for an unclosed set_variable tag, or possibly an unclosed quote-string or missing paren.
Last edited by Sapient on April 20th, 2006, 4:25 pm, edited 1 time in total.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: can someone please explain me that weird error?
I think that's saying you've probably got a typo, where do you use [set_variable]?? Find it and then when you found it look to see the closing tag and apparently there's something wrong with it... Experiment, see if it still happens when you take that whole section out, see if it starts even if it doesn't work properly.toms wrote:Sorry that I need help that often, but now something I´d never find out.
I get following error message (in own words and translated, but true):There is left to say that line 31 in Scout.cfg is a path to the scenarios folder,Code: Select all
missing tag close for [set_variable] in data/game.cfg:94 taken over from data/game.cfg taken over from scenarios/landing.cfg:9 taken over Scout.cfg:31, ...
line 9 of the file landing.cfg is a use of the predefined macro {VARIABLE_OP VAR OP ARG}.
With '...' other places where it appears are meant
Ah, I misunderstood earlier.
Likely, there is something wrong with the way you are using the predefined macro. It would be a lot easier to tell this if you post the relevant code from landing.cfg (around line 9)
Likely, there is something wrong with the way you are using the predefined macro. It would be a lot easier to tell this if you post the relevant code from landing.cfg (around line 9)
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Another thing appeared right now:
The following code doesn´t produce errors, even worse it does nothing.
Please tell me even if there is a typo because I wouldn´t find it.
The following code doesn´t produce errors, even worse it does nothing.

Code: Select all
#define ENEMIES_APPEAR
[event]
name=moveto
first_time_only=no
[filter]
side=1
[not]
description=Tith
[/not]
[/filter]
{RANDOM 0..3}
[if]
{VAR random numerical_equals 0}
[then]
[store_locations]
variable=enemyloc
radius=4
x=$x
y=$y
[/store_locations]
{VARIABLE_OP length format ("$enemyloc.length")}
{VARIABLE_OP randloc random (1..$length)}
{FOREACH enemyloc k}
[if]
{VAR randloc equals k}
[then]
{VARIABLE_OP xloc format $enemyloc[$k].x}
{VARIABLE_OP yloc format $enemyloc[$k].y}
{VARIABLE_OP unittp random (Wolf,Gryphon)}
[unit]
type=$unittp
x=$xloc
y=$yloc
[/unit]
{CLEAR_VARIABLE unittp}
[/then]
[/if]
{NEXT k}
{CLEAR_VARIABLE xloc}
{CLEAR_VARIABLE yloc}
{CLEAR_VARIABLE k}
{CLEAR_VARIABLE enemyloc}
{CLEAR_VARIABLE randloc}
[/then]
[/if]
[/event]
#enddef
First read, then think. Read again, think again. And then post!
Did you try inserting some message statements to see how far it gets? Also, why is it inside a #define? Did you remember to call the macro after defining it?
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
I dont´t know what you mean. It is a macro for more than one levels where exactly the same thing appears, defined in an external file, if you mean that.Sapient wrote:Also, why is it inside a #define? Did you remember to call the macro after defining it?
I will try that with the messages...
First read, then think. Read again, think again. And then post!
After you define a macro, you have to call it... Sapient is asking, did you remember to put
in the scenario file itself? If you just define the macro and don't call it, it doesn't do anything, because it never actually appears in your code.
Code: Select all
{ENEMIES_APPEAR}
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Code: Select all
[store_locations]
variable=enemyloc
radius=4
x=$x
y=$y
[/store_locations]

Also, this...
Code: Select all
{VARIABLE_OP length format ("$enemyloc.length")}
{VARIABLE_OP randloc random (1..$length)}
Code: Select all
{VARIABLE_OP length format "1..$enemyloc.length"}
{VARIABLE_OP randloc random $length}