chaoloveicemdboy
Member
I'm having trouble with my lua script in choalover_server_mod.wad. Here is the following warning I'm getting: WARNING: choalover_server_mod.wad|LUA_CHAO:129: unexpected symbol near ')'.
Code:
addHook("ThinkFrame", do
for player in players.iterate
if not (player.mo and mapheaderinfo[gamemap].rpgmode)
continue
end
if (player.pflags & PF_NIGHTSMODE or player.spectator) continue end
if (player.cmd.buttons & BT_CUSTOM1)
if player.rpgaction == nil
player.rpgaction = 4
else if player.rpgaction == 4
player.rpgaction = 3
else if player.rpgaction == 3
player.rpgaction = 2
else if player.rpgaction == 2
player.rpgaction = 1
else if player.rpgaction == 1
player.rpgaction = 0
else if player.rpgaction == 0
player.rpgaction = nil
else
player.rpgaction = nil
end
end
if (player.cmd.buttons & BT_CUSTOM2) return end
if (player.cmd.buttons & BT_CUSTOM3)
if player.rpgaction == nil
player.rpgaction = 0
else if player.rpgaction == 0
player.rpgaction = 1
else if player.rpgaction == 1
player.rpgaction = 2
else if player.rpgaction == 2
player.rpgaction = 3
else if player.rpgaction == 3
player.rpgaction = 4
else if player.rpgaction == 4
player.rpgaction = nil
else
player.rpgaction = nil
end
end
end
end)