Hi ♫
def crowdDispleaser #If the approval meter is more than 0 if ((Approval > 0) && (Approval <= 100)) #Decrease the approval meter by 5 points (CHANGE AMOUNT IF REQUIRED) Approval - 5 enddef damageTaken #If the player takes damage if ((mhp > 0) && ( mhp <= 100)) #Decrease the approval meter by 5 points (CHANGE AMOUNT IF REQUIRED) Approval - 5 end
If you look at crowdDispleaser and damageTaken you can see that you close the if structure, but never close the function. This breaks the whole script. What you mean to do is either
def crowdDispleaser #If the approval meter is more than 0 if ((Approval > 0) && (Approval <= 100)) #Decrease the approval meter by 5 points (CHANGE AMOUNT IF REQUIRED) Approval -= 5 endend def damageTaken #If the player takes damage if ((mhp > 0) && ( mhp <= 100)) #Decrease the approval meter by 5 points (CHANGE AMOUNT IF REQUIRED) Approval -= 5 endendOR
Code:
def crowdDispleaser #If the approval meter is more than 0 if ((Approval > 0) && (Approval <= 100))Approval -= 5enddef damageTaken #If the player takes damage if ((mhp > 0) && ( mhp <= 100))Approval -= 5end
Also, typing
"Approval - 5" does not decrease the value of Approval by 5, for that you use
"Approval -= 5" or
"Approval = Approval - 5"
Lastly, I am fairly sure you cannot access Approval within the APB module at all, for two reasons:
- You are not working within that module
- It is a constant (unchangable) variable (as noted by the capital letter at the start)
There seem to be a lot of mistakes here, which is absolutely fine as you are very new to scripting. If you have other queries feel free to send me a PM.
/Kai