Luigifan18
Member
Hey, I tried to make an iterative function to enable Flora's Holy Flame to bust walls, and it's generating an error. Here's my code and the error.
The first highlighted line is line 216 in my full Lua script, which is what's causing the error report:
So... what's the problem here? I'm not seeing it... help, please?
Holy Flame Wall Smashing:
--Breaking bustable walls and spikes
addHook("MobjLineCollide", function(mobj, line)
local backfront = {line.frontsector, line.backsector}
for rover in backfront.ffloors{
if (mobj.z <= ffloor.topheight or mobj.z >= ffloor.bottomheight) then
if ffloor.master.special == 252
or ffloor.master.special == 253
or ffloor.master.special == 254
or ffloor.master.special == 255
or ffloor.master.special == 256 then
EV_CrumbleChain(backfront, rover) --Holy Flame can break bustable walls
return true
else
continue
end
end}
end, MT_HOLYFLAMECORE)
addHook("MobjLineCollide", function(mobj, line)
local backfront = {line.frontsector, line.backsector}
for rover in backfront.ffloors{
if (mobj.z <= ffloor.topheight or mobj.z >= ffloor.bottomheight) then
if ffloor.master.special == 252
or ffloor.master.special == 253
or ffloor.master.special == 254
or ffloor.master.special == 255
or ffloor.master.special == 256 then
EV_CrumbleChain(backfront, rover) --Holy Flame can break bustable walls
return true
else
continue
end
end}
end, MT_HOLYFLAME)
The first highlighted line is line 216 in my full Lua script, which is what's causing the error report:
It'd be nice if you told me [B]WHAT[/B] symbol was unexpected...:
WARNING: ...\SLADE\The Belnades Sisters\CL_Flora-Belnades.pk3|Lua/LUA_FLORAABILITIES:216: unexpected symbol near 'if'
So... what's the problem here? I'm not seeing it... help, please?