Questions tagged as 'lua'

1
answer

How do I get a value in Lua without using io.read ()?

Let's say I have something like a = io.read() a = tonumber(a) if a then print(a,a^2-1) end Is there another way to get this input without being io.read() ?     
asked by 13.11.2016 / 19:24
1
answer

Decrypt a code (so I understand it is in ASCII)

Well, basically I would like to know if there is any way to transform a script written in ASCII into Characters and if so, how would I transform it? Code (1) local code = '7 minimize = true -- minimizar a mainbp? bps = 1 -- quantidade d...
asked by 19.07.2016 / 19:04
1
answer

Keep connection active after a POST request

I'm trying to create a script to enable the bandwidth control QOS service of my router, but I'm doing something wrong because I can not keep the connection after making a POST request. local host = '192.168.0.1' local headers = [[]] local Lua...
asked by 03.08.2016 / 10:15
2
answers

How to escape special characters?

I need the output to be a special character from an arrow pointing to the right (→) for example, whose Unicode code is U + 1F812. I have tried to write in various ways always with \ or % preceding the Unicode code (similar to writing a tab or...
asked by 23.04.2016 / 07:11
1
answer

Get table inside table Lua through C ++

I have a lua file with the following content: Pokes_Icons = { ["Bulbasaur"] = { on = 12906, off = 12908, used = 12907, } } I'm trying to get the value of "on" in C ++, I tried it like this...
asked by 30.03.2015 / 18:31
1
answer

How to read a moon table in C as follows

I am trying to create a moon reading that can read this table below, the table should only accept values and if they add string, it warns the location of the error. Table = { 1000, 2000, 3000, 4000, 5000,...
asked by 24.03.2015 / 00:48
1
answer

How to convert a string to a number in Lua?

In Lua, how to convert a value of type string to type number (integer, float, etc.)?     
asked by 24.04.2015 / 17:05
1
answer

Help how to save a table

How to save a table to a storage or string , and how would I return it?     
asked by 26.04.2015 / 16:00
1
answer

Use string and integer on the moon

Well I have a table as follows: { Number: 15007 Name: "Variance" Value: 35 } Before I used a txt format that was like this: 15007,Variance,35 The code in C was something like this: void read_names(void) { s...
asked by 29.03.2015 / 20:30
1
answer

About key command (lua script)

Is there any way I can put something in the script, so that if I press a key, it responds with a command? If so, how?     
asked by 05.02.2015 / 21:11