Questions tagged as 'lua'

5
answers

Is it possible to program for web with Lua?

I see many tutorials on the internet that assimilate the use of language Lua to game development. But I would like to know the following: Is it possible to develop for web using language Lua ? Is there a framework that c...
asked by 10.12.2015 / 19:50
2
answers

What is the difference between repeat and while on the moon?

Is there any difference in the usability of repeat and while on the moon? In my opinion, the two seem to have the same purpose. Not taking into account the syntax, is there any difference between them, however minimal?     
asked by 18.12.2015 / 14:48
2
answers

How to make an object jump only once. in the LÖVE framework?

I'm trying to make a game, using the framework LÖVE to Lua , in which the player is a ball and has to overcome obstacles and enemies but I'm having a problem in making the jumps. > function love.keypressed( key ) if key == "w"...
asked by 04.02.2014 / 21:57
2
answers

Is there a package management system on the Moon?

Many languages have a package management system. This makes the life of the programmer much easier, making development more agile. For example, in Python we have pip and easy_install , in PHP times pear and compo...
asked by 04.02.2016 / 11:21
3
answers

Insert data from a string into a table

I have a text file that I read and set it to a string texto so that it looks like this: {nome="Cassio",sexo="M",idade=19} {nome="Paula",sexo="F",idade=20} And I used the following code to add each line of that string to a position i...
asked by 03.05.2014 / 18:43
3
answers

String contains a certain word

I would like to check if a string contains a certain word. String = "oi\ntchau\nhi\nbye" The string is divided by \n (skip line), I would like to check between each line, if it contains the entire word, I already tried it and sti...
asked by 05.09.2014 / 09:17
2
answers

How do I return a given character from a text?

How do I return a particular character from a text? For example: text = "Eu sou vegano" How do I detect the 5th letter of text ? If someone helps me, I'll be grateful.     
asked by 19.12.2016 / 00:22
3
answers

What is the function of the 'do' statement?

What does 'do' alone expect and do? do ... end     
asked by 28.02.2016 / 17:03
1
answer

Accented letters returning invalid character

Well, I realized that in Lua, it is not possible to use letters with an accent. print("á") Returns an invalid character. Is there any way to avoid this?     
asked by 27.10.2014 / 04:59
1
answer

Order table by contained value

I want to sort this table by a value contained in it. Ex: tabela = { {pessoa="Joao", idade=20}, {pessoa="Pedro", idade=22}, {pessoa="Lucas", idade=19}, {pessoa="Derp", idade=25} } I want to sort the table by age. Something like: table.sor...
asked by 08.10.2014 / 07:54