Numbers can be multiplied by strings.
Strings cannot be multiplier by numbers.
Strings cannot be compared to numbers.
The first seems like a bug compared to the other behaviour.
Numbered Steps to Reproduce Problem:
1. Take a string.
2. Take a number.
3a. string * number
4a. Runtime.
3b. number * string
4b. Result is 0.
Code Snippet (if applicable) to Reproduce Problem:
/proc/main()
var/text = "hi"
var/number = 4
world.log << (number * text)
world.log << (text * number)
Expected Results:
Everything runtimes.
Actual Results:
number * text evaluates to 0
Workarounds:
Try not to multiply numbers by text.
Furthermore, you can divide in the other direction:
I was wondering if this had anything to do with color math, as if DS was expecting the string to be a color, but I tried using "#FFF" and it didn't seem to affect the result.
EDIT: And another thing. If you try addition or subtraction, as in "something" + 4, it gives the runtime error "type mismatch." However, doing "something" * 4 will instead give the error "undefined operation"