mob
var
combos = "" // A string defining the current combination of moves
proc
Combo(move as text)
ASSERT(istext(move))
ASSERT(istext(combos))
world << "All tests passed"
verb
punch()
Combo("p")
kick()
Combo("k")
mob
var
test_string = ""
verb
test()
ASSERT(istext(test_string))
world << "All tests passed"
Problem description:
When using 'test'
All tests passed
When using 'punch'
runtime error: combos.dm:9:Assertion Failed: istext(combos)
proc name: Combo (/mob/proc/Combo)
source file: combos.dm,9
usr: F0lak (/mob)
src: F0lak (/mob)
call stack:
F0lak (/mob): Combo("p")
F0lak (/mob): punch()
When using 'kick'
runtime error: combos.dm:9:Assertion Failed: istext(combos)
proc name: Combo (/mob/proc/Combo)
source file: combos.dm,9
usr: F0lak (/mob)
src: F0lak (/mob)
call stack:
F0lak (/mob): Combo("k")
F0lak (/mob): kick()
I'm confused as to what could be causing this, as it's the istext(combos) assertion that's crashing. This is the only code in the environment, so there's nothing that could be interfering with this.