Hello! I have a function that calculates and finds a value in percent form and updates the text (ex: local valueText). I want the user to know that the number he sees on screen is a percent value so I havev valueText.text = number…%. Now if I want to use this new valueText.text value in a formula, is it possible to do the calculations with the “…%” or will I get an error code and need to include something in the formula to void the “…%” and continue on with just the raw number? Thanks for the help! [import]uid: 35535 topic_id: 31693 reply_id: 331693[/import]
You will get an error - both from % and the fact it’s a string. Use tonumber and no % for that part then add % back at end. [import]uid: 52491 topic_id: 31693 reply_id: 126620[/import]
thanks for clearing that up! [import]uid: 35535 topic_id: 31693 reply_id: 126669[/import]
You will get an error - both from % and the fact it’s a string. Use tonumber and no % for that part then add % back at end. [import]uid: 52491 topic_id: 31693 reply_id: 126620[/import]
thanks for clearing that up! [import]uid: 35535 topic_id: 31693 reply_id: 126669[/import]