Monument Posted March 28, 2021 Share Posted March 28, 2021 hello I have a value and its source ( Element Data ) And this value comes with String function requires the absence of it Link to comment
Addlibs Posted March 28, 2021 Share Posted March 28, 2021 (edited) 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 March 28, 2021 by Addlibs Link to comment
Tekken Posted March 28, 2021 Share Posted March 28, 2021 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now