The Menu options are : Battle, Equip, Assist and Run
Battle needs to have various if statements and checks.
It needs to check if a sword is equipped, if courage is higher than 5 and if the monster's health is above 0.
I'm currently trying to add an elif to see if Monster Health is above 0 and the sword is equipped, but I get the following error.
The -> refers to the little red arrow.Parsing the script failed.
line 41: expected statement.
elif sword ->== True and mhealth >0:
The code I'm running is as follows:
Code: Select all
python:
sword = False
mhealth = 40
rint = 3
label BattleChoice:
menu:
"Battle":
if sword == False and rint <5 and mhealth > 0:
"Attack Missed"
$ mhealth = mhealth -0
"MHealth = [mhealth]"
jump BattleChoice
elif sword == True and mhealth > 0: (line 41)
"Critical Hit"
$ mhealth = mhealth -5
"MHealth = [mhealth]"
jump BattleChoice
Turns out my indentation for the jump statement wasn't properly alligned. I'm not quite sure why it suddenly started working, as before it would not recognize the jump statement, but I'm not complaining.
Thank you so much.
PS: Does anyone know what the red arrow in error messages is supposed to mean in general? Would like to know for future reference.