The problem I'm encountering, is that the robot won't reset the result counter to zero after it finishes rolling. The code is set up to empty it out when it begins a new roll, so that it'll return the result the same until you begin a new roll, (Duhrr) This is an example of the code, in a second I"ll give you the problem:
end :skill_dagger set "d_two" "s_dagger" set "s_two" "s_dagger" goto "use_str" ... :use_str set "d_one" "str" set "s_one" "str" goto "beginroll" ... :beginroll set "result" 0 divide "d_two" 100 divide "s_two" 10 divide "d_one" 100 divide "s_one" 100 inc "d_one" "d_two" inc "s_one" "s_two" set "std_d" "d_one" :roll if "d_one" = 0 "finish" set "loopcount" random "std_d" through "s_one" inc "result" "loopcount" dec "d_one" 1 goto "roll" :finish set "d_one" 0 set "d_two" 0 set "s_one" 0 set "s_two" 0 set "loopcount" 0 end
And it just progressively adds to the result counter, never clearing it. So you get things like:
Rolled 9
Rolled 254
Rolled 456
Rolled 1024
Rolled 1333
And I can't figure it out. HHHHHHEEEEELLLLLLPPPPP

Help








