Julia
The only SRB2 and Touhou fan ever to exist lmao
So I'm helping @jimbojimbob with his mod, and I'm making him a flight cancel. Problem is, the code spats out the error 'end' expected (to close 'if' at line 4) near '<eof>' when loaded in. For reference, here's the code so you can see what I'm working with:
So can any lua experts help me out here?
NOTICE: The top piece of code works fine on its own. I just need to fix 2 oversights that causes tails to not hurt badniks when using said move.
Flight Cancel script.:
addHook("ThinkFrame", do
for player in players.iterate
if player.mo and player.mo.skin == "tails" then
if (player.cmd.buttons & BT_CUSTOM1)
and player.panim == PA_ABILITY
and not P_IsObjectOnGround(player.mo)
player.pflags = $1 & PF_JUMPED
player.mo.state = S_PLAY_JUMP
if player.mo and player.mo.skin == "tails" then
if player.pflags & PF_JUMPED
player.pflags = $1 & PF_JUMPED
player.mo.state = S_PLAY_JUMP
if player.mo and player.mo.skin == "tails" then
if player.pflags & PF_SHIELDABILITY
player.pflags = $1 & PF_SHIELDABILITY
player.mo.state = S_PLAY_FALL
end
end
end
end
So can any lua experts help me out here?
Post automatically merged:
NOTICE: The top piece of code works fine on its own. I just need to fix 2 oversights that causes tails to not hurt badniks when using said move.