John Posted July 4, 2024 Share Posted July 4, 2024 Здравствуйте. Вопрос по lua. Есть переменная типа строка s s = "100" Как превратить её в число? Quote Link to comment Share on other sites More sharing options...
TechnoViking Posted July 4, 2024 Share Posted July 4, 2024 Для этого можно воспользоваться встроенной функцией tonumber Пример: local s = "100" print(type(s)) local num = tonumber(s) print(type(num)) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.