Lua is a powerful, fast, lightweight, embeddable scripting language. It's dynamically typed, runs by interpreting bytecode and has automatic garbage collection. It is often referred to as an "extensible extension language".
2
votes
0answers
23 views
Lua for windows https
I've got a question about Lua and https. I'm developing some software for a router which supports Lua. The bad thing is that this router doesn't support debugging. So I was looking for an IDE for Lua.
...
1
vote
2answers
31 views
Update the target coordinates while transitioning
I am making a game in corona and I am facing a problem. I have a circle on screen and I want it to follow the touch coordinates continuously. I am using transition.to function to do so but the thing ...
0
votes
1answer
20 views
love2d - How would I make the entity player jump on the press of Up or W
How would I make the entity player jump on the press of Up or W, ive searched and searched but no method ive seen will work with my code. Currently when Up or W is pressed the character just goes up ...
0
votes
0answers
23 views
How to fire a bullet in the direction of finger swipe in corona sdk
I am working on a game in corona. I want to fire a bullet when a user swipes their finger on an object. The further he swipes, the further the the bullet should go. I worked on this and on tap event ...
1
vote
1answer
18 views
How to move an object randomly with transition.to?
I'm trying to move an object randomly to different locations, so I came out with the following: transition.to generates the x,y randomly as well as the time, and on finish runs another function which ...
0
votes
3answers
42 views
Getting error while trying to remove display objects that are no use anymore
I am getting this error:
attemp to index ? a nil value
in the beginning of the update function. What might be the reason?
--Create drop
local createDrop=function()
drop = ...
3
votes
1answer
32 views
Lua 5.2 - Loading a file and returning its environment
i'm attempting to do the following : (include() code below)
File1.lua
A = 5
File2.lua
file1 = include(File1.lua)
A = 1
print(A) -- 1
print(file1.A) -- 5
i've found exactly what i'm looking ...
-1
votes
0answers
22 views
Adding a .a library to Netbeans, [on hold]
I am trying to start to code with the Lua API using C on Linux. I have the liblua.a as a static library file.I am using Netbeans as my IDE so it is generating my makefile, so now how do i make my C ...
4
votes
2answers
51 views
Calling lua function that returns table
I know the basics of interacting with lua and C, and I am currently trying to perform the following line of lua in c++
Func1():Func2().Table1.value1
I am trying to get the value of "value2" and use ...
2
votes
3answers
48 views
Math.random on non whole numbers
How can I generate numbers that are less than 1?
for example i would like to generate numbers from 0.1 to 0.9
what I've tried:
math.random(0.1,0.9)
3
votes
1answer
60 views
Messages formatting the wrong way round
I have the following code to send a block of text to a users' game console (Crysis Wars):
CMCCPlayer(player, ...
0
votes
0answers
20 views
Logging a variable set by nginx's Lua module
I am trying to use the Lua module in nginx to set a variable ("foo") based on JSON in the body of a request. Then I want to log the value of that variable to the access log.
Like so:
http {
...
-1
votes
1answer
39 views
Best way to encrypt on a server (PHP), and decrypt on the client (Lua)?
What is the best way to encrypt, say, a string on a server (PHP) with a 'key' - that when this encrypted string is transferred to a client (Lua), the client can decrypt this string back to normal with ...
2
votes
1answer
30 views
Lua pass function argument as a table key
I'm working on exporting the contents of a Lua table to a HTML File so I can display the contents in the browser. Right now I'm having problems with passing a function argument as a table key.
I ...
0
votes
3answers
32 views
Assign text file into a variable
Is it possible to assign a text file into a variable and access the file by just calling the variable? If so, how do you do it?