ID:1678033
 
Keywords: crash, help, takethtml
(See the best response by Pirion.)
Code:
proc/TakeHTML(T as text)
if(!istext(T)) return src<<"[T] is not text!"
if(!findtext(T,"<")&&!findtext(T,">")) return T
while(findtext(T,"<")&&findtext(T,">"))
var/pre=copytext(T,1,findtext(T,"<"))
var/pos=copytext(T,findtext(T,">")+1)
T=pre+pos
return T


Problem description: It might look like it may work, and it does. Try making a rename verb with it. But it will work right? Use x-fade, then rename yourself with the x-fade html. THEN type a > at the beginning. As you can see, it crashes the game. Why does it do that?I already tried getting help with a skilled programmer, but they just don't know. :( Can I get a clarification on this? And could you possibly fix it for me?

I notice it happens on other games too that have a similar process.


Best response
Assumption would be because you're not validating that pos starts AFTER pre; causing a misparse of your tags.
OK, so I flipped T=pre+pos to T=pos+pre

It seems that fixed it. Thank you for your answer. It helped me to understand why it was doing that crap.