[set_variables] not supported at scenario toplevel
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.
[set_variables] not supported at scenario toplevel
Hi, I encounter an error when i try to set my arrays that say in the debug console "Error : [set_variables] is not supported at scenario toplevel (3)"
I've search in the wiki but I can't figure out my problem
so my 3 set_variables don't work but it seems to be the correct syntax, my code here:
I've search in the wiki but I can't figure out my problem
so my 3 set_variables don't work but it seems to be the correct syntax, my code here:
Code: Select all
#define PLAYERS_STATS
[set_variables] # Stuffs
name=equipped
mode=replace
[value] # 0 Placeholder
helmet=""
torso=""
legs=""
boots=""
cape=""
hand=""
[/value]
[value] # Leader 1
helmet="1"
torso=""
legs=""
boots=""
cape=""
hand=""
[/value]
[value] # Leader 2
helmet="2"
torso=""
legs=""
boots=""
cape=""
hand=""
[/value]
[value] # Leader 3
helmet="3"
torso=""
legs=""
boots=""
cape=""
hand=""
[/value]
[value] # Leader 4
helmet=""
torso=""
legs=""
boots=""
cape=""
hand=""
[/value]
[value] # Leader 5
helmet=""
torso=""
legs=""
boots=""
cape=""
hand=""
[/value]
[value] # Leader 6
helmet=""
torso=""
legs=""
boots=""
cape=""
hand=""
[/value]
[/set_variables]
[set_variables] # Upgrade Count
name=upcount
mode=merge
[value] # 0 Placeholder
hp=0
mvmt=0
m_strike=0
m_damage=0
r_strike=0
r_damage=0
[/value]
[value] # Leader 1
hp=0
mvmt=0
m_strike=0
m_damage=0
r_strike=0
r_damage=0
[/value]
[value] # Leader 2
hp=0
mvmt=0
m_strike=0
m_damage=0
r_strike=0
r_damage=0
[/value]
[value] # Leader 3
hp=0
mvmt=0
m_strike=0
m_damage=0
r_strike=0
r_damage=0
[/value]
[value] # Leader 4
hp=0
mvmt=0
m_strike=0
m_damage=0
r_strike=0
r_damage=0
[/value]
[value] # Leader 5
hp=0
mvmt=0
m_strike=0
m_damage=0
r_strike=0
r_damage=0
[/value]
[value] # Leader 6
hp=0
mvmt=0
m_strike=0
m_damage=0
r_strike=0
r_damage=0
[/value]
[/set_variables]
[set_variables] # Leader Location
name=leader_pos
mode=replace
[value] # 0 Placeholder
x=""
y=""
[/value]
[value] # Leader 1
x=5
y=21
[/value] # Leader 2
[value]
x=28
y=4
[/value] # Leader 3
[value]
x=30
y=1
[/value] # Leader 4
[value]
x=3
y=24
[/value] # Leader 5
[value]
x=1
y=21
[/value] # Leader 6
[value]
x=32
y=4
[/value]
[/set_variables]
#enddef
-
- Posts: 1226
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: [set_variables] not supported at scenario toplevel
put them in a start or prestart or ??? event.
Speak softly, and carry Doombringer.
Re: [set_variables] not supported at scenario toplevel
Oh, i try to use arrays, i actually use variable to store values and this don't need to be in an event to initialize values, so i've think than set_variables don't need to.
Thanks to the answer, i've start wml juste 2 days ago ^^'
Thanks to the answer, i've start wml juste 2 days ago ^^'
Re: [set_variables] not supported at scenario toplevel
[scenario] should not recognize [set_variable] either. If it currently happens to support it thats bug.
Re: [set_variables] not supported at scenario toplevel
Thanks's for the precision Ravana. It's always better to know why it don't work then only know the solution ^^