First, thank you for the quick reply.
Shaz, you are right it is used outside of battle....
I am trying to simulate an army battle ala suikoden 1, with 2 armies and 4 groups. Archers, light infantry, heavy infantry, and cavalry. I have set it up as an event page to assign 8 variables certain values before the "battle". Think of it as a mini game used to represent an army battle in my game. I will endeavor to give as much info as possible. I have the common event in one bmp with the full screen, and the event page in another, and finally the error message when I try to use this common event. The error says it is an error in the syntax of the script I wrote.
The idea is a group is either strong or weak against another group. Against the same they lose about the same. For the same I took the value of the player army, divided by 2, subtracted the result from the opposite side, and multiplied the player army by two to get original result, and subtract the new enemy number from the player army group. For a group strong, divide and multiply the same for the strong group, and divide and multiply by 4 for the weaker.
The problem is when the variable is reduced below 0. I am trying to make it not drop below zero. I know this may make the computer use 0 number groups, but the main issue is I have a variable for representing the total army strength, that add the values of the four variables as seen in the event page.These are the variables I am attempting to use to base a conditional branch on to decide if the player wins or loses the battle. before I tried to use this common event the second issue I have other than the negative numbers is using this conditional branch. When either group runs out of troops (the total variable 82 or 83) drops below zero, the event says both you won and are out of troops, and goes to the self switch A, which states that they were beaten. (This is an issue as in my vision the results will be either the battle is won or it is game over, this is set up this way as a test before implementation.)
In the event image it reads 1-2-3
4-5
from 4, I go to the end, as the event page is extremely long. I select a random number 1-4 to represent the choice the computer makes, and so the script repeats with minor variation, adjusting the formulas and variables used due to which two groups battle at that point, then going back to the fight! label.
Sorry for the long post, any help is appreciated.
Note...I will attach files on three posts, as I am limited on how much I can post.
error.bmp