Please excuse my ignorance if this seems to obvious a question...
I am in the process of creating a stat roller for a MUD. I have created the needed triggers and have all the variables set up as needed within the script. I am attempting to add the totals for the stats. As it stands now, I have variables for each stat (i.e. Str, Wis, Int, etc...). The problem is that when I attempt to add them, the variables are concatenated instead of summed.
The command I use is a simple - total = str + wis + int
I assume this is because the script thinks that the variables are strings and not integers. How would I modify this?
BTW...I tried to change the trigger so that I was using a regular expression. After some trial and error, I managed to get the trigger to send only the numbers to the variables. This time though instead of concatenating or adding them in the script, I simply get an invalid class error. (That's not the exact error, but I think you will catch my drift.)
I am in the process of creating a stat roller for a MUD. I have created the needed triggers and have all the variables set up as needed within the script. I am attempting to add the totals for the stats. As it stands now, I have variables for each stat (i.e. Str, Wis, Int, etc...). The problem is that when I attempt to add them, the variables are concatenated instead of summed.
The command I use is a simple - total = str + wis + int
I assume this is because the script thinks that the variables are strings and not integers. How would I modify this?
BTW...I tried to change the trigger so that I was using a regular expression. After some trial and error, I managed to get the trigger to send only the numbers to the variables. This time though instead of concatenating or adding them in the script, I simply get an invalid class error. (That's not the exact error, but I think you will catch my drift.)