-
Hello, I asked for help before when I was using flash, but when I got MX, some little things changed.
on(release){
ac = dexbonus + acbase;
}
Why does that not work correctly?
ac base is 10, and for the sake of argument, dexbonus is 4, when using that script above, ac comes up as 410, and not 14, why is that?
-
Convert the values to numbers.
Use this:
Code:
on(release){
ac = parseInt(dexbonus) + parseInt(acbase);
}
or this:
Code:
on(release){
ac = Number(dexbonus) + Number(acbase);
}
For all intents and purposes they do the same thing.
-
I thank you very much, it works well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|