Questions tagged as 'lua'

1
answer

How to run scripts in Lua with java program? [closed]

I want to learn how to develop, combining more than one programming language, using java with moon scripts.     
asked by 01.12.2017 / 14:18
1
answer

How to declare string strings?

Moon is written in C logo shares the American Standard Code for ASCII Information Exchange Accepts array key declaration with accent: rafael = {} rafael["é"]="eu" print(rafael["é"]) --saída: eu But how to do string declaration with...
asked by 16.10.2017 / 03:37
1
answer

Factor numbers from 1 to 9, cumulative variable printing wrong number

Why does not my accumulator variable print 6? acum=1 n1=6 for i=1,2,3 do if n1%2==0 then acum=acum*2 n1=n1/2 elseif n1%3==0 then acum=acum*3 n1=n1/3 elseif n1%5==0 then acum=acum*5 n1=n1/5 elseif n1%...
asked by 04.12.2016 / 02:38
0
answers

How to open a program using Atom?

Hello, I use the Atom to write program in Lua, I would like to insert a button in some part of Atom for when it is clicked to call a specific program (in this case the Corona SDK simulator). How can I do this?     
asked by 26.02.2018 / 12:32
1
answer

Remove element / function Corona SDK

I have form.lua file with code: local _M = {} function _M.calc( a ) local quad = display.newRect(100,100,100,100) end return _M and the file scene2.lua with the code: local form = require "form" form.calc( ) I need...
asked by 04.02.2018 / 18:11
0
answers

Literal strings Crown Moon

I'm kind of lost with \t . In the console, it works and in the simulator it is ignored. If anyone knows of a possible solution. local myText = display.newText("a\tb", 200, 100, native.systemFont, 16) print(myText.text) Or: a = "oi"...
asked by 30.03.2018 / 01:45
1
answer

How do I trigger a remote event for the server and client in the same script in ROBLOX Studio?

I've already tried remoteEvent:FireAllClients() remoteEvent:FireServer() But it did not work. It said FireServer could only be used by the client. I've also tried: --No server script em workspace remoteEvent:FireClient(script.Local...
asked by 25.02.2017 / 00:28
0
answers

Is there a text editor with integration with Github?

I'm using Notepad ++ to program in Lua (small programs, I'm still studying), and I usually save the codes in Github when I have to stop to continue later. But manually I need to go to the Github website and add the file, and if you want to ch...
asked by 05.01.2017 / 00:10
1
answer

Is there a way to stop tweening in ROBLOX studio?

I want a command that stops a tweening in ROBLOX studio, for example: frame:TweenPosition(UDim2.new(0, 200, 0, 0), "Out", "Quad", 1) But when you get some condition, is there any way to stop this tweening?     
asked by 02.01.2017 / 18:39
0
answers

Vector ordering

I'm learning about vectors and arrays, and for a long time I can not solve a question correctly. The statement says: Given some vector, sort it sequentially (numeric). Example: Entrada:{1,2,2,3,3,4} Saída:{1,2,3,4,2,3} I've made a co...
asked by 08.07.2016 / 18:38