Hi dear people
I work a lot on some script and I notice the people use a lot
to_s
I never really understand in begin but now I understand ;3
the use of to_s
serve for convert numbers or float in Strings
I guessed it is a lot use in Graphics stuff for enumerate the graphics (index purpose most of time)
def somethingself = Sprite.newself.bitmap = Cache.system("com_" + index.to_s)endit will convert the ''index'' who are a number in String
if you don't do the to_s it will Send you a error who can't convert number and float in strings
but with this it pass the restriction and allow you to convert it
so it is all I can explain about to_s
see ya people ;3
I work a lot on some script and I notice the people use a lot
to_s
I never really understand in begin but now I understand ;3
the use of to_s
serve for convert numbers or float in Strings
I guessed it is a lot use in Graphics stuff for enumerate the graphics (index purpose most of time)
def somethingself = Sprite.newself.bitmap = Cache.system("com_" + index.to_s)endit will convert the ''index'' who are a number in String
if you don't do the to_s it will Send you a error who can't convert number and float in strings
but with this it pass the restriction and allow you to convert it
so it is all I can explain about to_s
see ya people ;3
