Text macros like \his currently throw a compile time error if there isn't a valid object in the string. Would it be possible to make this a runtime error?
The situation I found this in was whilst creating a datum based emote system. Each mob has a emotehandler datum which gives access to the emote datums that can be performed by that mob type. There is only one of each emote datum in existence, held in a global list. The emote handler passes in the mob that is using it.
The issue arose with the line mimeText = "clutches at \his throat desperately" - mimeText is an object variable of the emote datum, and is always user in the context of message = "[user] [mimeText]", so by the time it is used the \his always has a valid object to work with, but as things stand this will not compile, giving the error macro \his requires preceeding expression (btw, preceding shouldn't have that double e)
I can work around it, but it would be far nicer to have the error come up as a runtime and the compiler trust me to put a valid expression in
ID:2084385
May 14 2016, 10:50 pm
|
|||||||
| |||||||
May 15 2016, 2:50 am
|
|
Bay (SS13) worked around this by having "gender datums";
|