[SOLVED] Displaying msg.url() works with print and debugdraw but not with labels ("userdata")

Hi

I just tried to spawn a game object with a factory, and display its URL via my.url()

Weird things happen:

1/ It works with the print function:
image

2/ It also works with debugdraw:
image

3/ But not with labels:


(it suddenly becomes a "userdata " :thinking:)

Displaying the URL above my spawned characters would have been useful for debugging purposes…

Is it possible to turn my “userdata” into a regular string?

tostring(value)

It doesn’t “become” userdata, it always is. It’s just that print() and debug_draw convert everything to strings for you.

3 Likes

Perfect, thanks :slight_smile: