ID:139166
 
Code:
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.
It's working fine for me. Are you sure that's the only code in the environment? Do you have any libraries included? Try outputting the value of combos, and/or setting it to something other than "".
In response to DarkCampainger
I'm 100% sure. There is literally not a single other file (dmi, dmm, dm, dmf, dms) in the environment. There are also no libraries included. That's all the code.

Even initializing combos to another string like "a" is failing the assertion. Could this be a BYOND bug, or am I just plain doing something wrong?

Edit:
Using the following code, I am getting the following message:
mob
var
combos = "a" // A string defining the current combination of moves

proc
Combo(move as text)
ASSERT(istext(move))
world << combos
ASSERT(istext(src.combos))
world << "COMBO - All tests passed"

verb
punch()
Combo("p")
world << "PUNCH"


runtime error: c.dm:9:Assertion Failed: istext(src.combos)
proc name: Combo (/mob/proc/Combo)
source file: c.dm,9
usr: F0lak (/mob)
src: F0lak (/mob)
call stack:
F0lak (/mob): Combo("p")
F0lak (/mob): punch()
0
PUNCH
In response to F0lak
It's working fine for me:
a
COMBO - All tests passed
PUNCH


I'm literally just copying and pasting the code you posted into a DM file.

Try closing and reopening DM, and copying the code from your post into a new DM environment (maybe there's a special character the post filter stripped out for you?)
In response to DarkCampainger
Try closing and reopening DM, and copying the code from your post into a new DM environment (maybe there's a special character the post filter stripped out for you?)

That did the trick, but looking between the two, they're identical

I suppose DM got buggy somewhere between me writing on my whiteboard and then writing code in DM. :/