Posts by vodka • 147 points
5 posts
-
1
votes1
answer254
viewsQ: Check if String contains commas
local t = "Hello, World" local v = "Hello World" I wonder how to check if a string contains commas...
-
3
votes1
answer82
viewsQ: Pass this Comma Numeric function to Point
I have a function that returns the number at home of a thousand, example: function getMilharNumber(n) -- critico return…
-
5
votes3
answers1079
viewsQ: How to format numbers in Lua?
I would like to know how to format the variable: local n = 100000000 So you can come back like this: 100.000.000 Separated by dots, someone knows how to do?…
-
4
votes2
answers729
viewsQ: POO tables in Lua!
I wonder why it is not returning a table in the code I made: TP = {} function TP:new(pos, newpos, effect) return setmetatable({pos = pos, newpos = newpos, effect = effect}, { __index = self }) end…
-
0
votes2
answers322
viewsA: Get the highest value of an array in Lua
tem_array = {10,2,3,20,1} table.sort(tem_array, function(a,b) return a > b end) print(tem_array[1])