Lua Question

by Abethor

Back to Mechanic's Corner.

Abethor2009-01-14 21:38:43
Alright, I can't seem to figure out what's wrong with this:

@@ if powerup==1 then
adrenaline
insomnia
thirdeye
resistance
deathsense on
@@ powerup=2
@@ elseif powerup==2 then
flex
@@ powerup=3
@@ elseif powerup==3 then
evoke malkuth
@@ powerup=4
@@ elseif powerup==4 then
grip
@@ powerup=5
@@ elseif powerup==5 then
weathering
@@ powerup=6
@@ elseif powerup==6 then
breathe deep
@@ powerup=7
@@ elseif powerup==7 then
stance legs
chant fortuna
@@ powerup=8
@@ elseif powerup==8 then
chant draconis
@@ powerup=9
@@ elseif powerup==9 then
chant populus
@@ powerup=10
@@ elseif powerup==10 then
evoke netzach
@@ powerup=11
@@ elseif powerup==11 then
evoke yesod
@@ powerup=12
@@ elseif powerup==12 then
chant acquisitio on
@@ powerup=13
@@ elseif powerup==13 then
chant rubeus
@@ powerup=14
@@ elseif powerup==14 then
consciousness on
constitution
@@ powerup=15
@@ elseif powerup==15 then
starchant benediction me
@@ powerup=16
@@ elseif powerup==16 then
immunity
@@ powerup=17
@@ else if powerup==17 then
@@ powerup=0
@@ message("XXX")
@@ end

This is the error message I get: ":60: `end' expected (to close `if' at line 1) near `' "
EDIT: This is an extension of an Alias I have that starts up the powerup value at 1.
Ilyarin2009-01-14 21:50:02
In your fourth to last line you've separated "else" and "if".
Abethor2009-01-14 21:51:22
Wow, thanks much. jumpfire.gif