Jump to content

String


Monument

Recommended Posts

What do you mean by absence of it? What is kind of information stored in such string?

Is it a number? If so, you can

theNumber = tonumber(theString)

to turn it from a string to a number

If it's a boolean, you can do a sort-of tertiary operation

theBool = theString == "true"

which treats a string that equals to "true" as a true value and all other strings as a false value.

If it's a JSON string object, you can fromJSON to turn in into a Lua table.

Edited by Addlibs
Link to comment

He wanted to somehow convert a string to an already existing variable that was storing an element, I have told him on pm that’s not possible, he made this topic as yesterday night I didn’t answered at time.

For now it’s fixed.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...