Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
91 views

I know format "*a" is used to read a whole file, "*l" used to read a line. But what does "*all" (which appears in the book Programming in Lua) mean? I also saw "*...
Masquue's user avatar
  • 332
1 vote
1 answer
79 views

so I was playing around with tables a bit and found this strange behavior: folder1 = {1, 2, 3} table.insert(folder1, "test") --4 folder1[5] = "test2" print("#folder1: " .....
Culain's user avatar
  • 11
0 votes
1 answer
73 views

Fruits = { apple = { ordered = true, amount = 10 }} i have several different kinds of fruits in this table and i need to output everything where ordered=true to make it look like this: apple ordered: ...
Bkbbkk Kkbbkb's user avatar
3 votes
1 answer
116 views

I am moving to Debian 10 from Ubuntu 20.04. Now Lua 5.3 is not finding my own modules using "require". Worked fine on Ubuntu before, I suspect I am missing something now... Pointers are most ...
hazefire's user avatar
-1 votes
1 answer
133 views

I'm trying code from lua.org and from my 4th edition Programming in Lua hardcopy, and as far as I've read all these table examples should work but 3 out of 4 don't, and I cant find anything the docs ...
Adrian Cornish's user avatar
4 votes
0 answers
697 views

I'm extending an application with an embedded Lua VM. My scripts sometimes cause it to crash, and I'd like to be able to make some sense out of the resulting crash dump (Windows). Is there already a ...
mojo's user avatar
  • 4,192
2 votes
1 answer
1k views

say I've two files test.lua and m.lua in a folder, in test.lua as: require("m") then I run this file, howerver it raise an error: lua: /Users/xx/works/scripts/test.lua:43: module 'm' not found: ...
tcpiper's user avatar
  • 2,564
1 vote
1 answer
504 views

I first download lua-5.3.5 , and put the source in my working directory and compile it with make linux so I got the liblua.a and lua binary file in ./lua-5.3.5/src. And then I write a C Dynamic ...
Lynton's user avatar
  • 287
0 votes
0 answers
897 views

I am using lua to make scripts in my game, after updating the lua libs version from 5.1 to 5.3, an error appears on the game engine every time I use math.X in a function error : Lua run doFile ...
Mohcen Maher's user avatar
2 votes
1 answer
301 views

In Lua 5.3, when a number is a float without any decimal part, printing it adds ".0" to the end of it, giving me the wrong answer in golf and speed competitions. Rounding or ~~x or x|0 forces it to be ...
Waffle's user avatar
  • 190
4 votes
1 answer
1k views

In my project I'm executing some lua functions contained in an XML file. I read the XML from C++, parse the code strings, execute them and get the result. All of the related questions I have found ...
John Doe's user avatar
  • 1,889
0 votes
1 answer
190 views

I have a configurable value of a table fetch function which i get as an input string. I need that string to be executed as a code and fetch a value from the nested table. I tried using load(string), ...
Bhanu's user avatar
  • 25
2 votes
2 answers
873 views

When testing code with both a predefined script and the LUA runtime environment, LUA will not take any form of string key values. However, if a numerical value key is used LUA will work with it as ...
Cole Lehman's user avatar
1 vote
0 answers
548 views

This is for a multiplayer game where NPC scripts will be loaded and cached as function chunks on a single lua_State, and then each time a player interacts with an NPC, a new lua_thread is created, a ...
newbane2's user avatar
  • 130
1 vote
1 answer
94 views

I rarely use Lua so this might be a trivial question but I just noticed that with Lua 5.3.2, in the interactive REPL I can write for example: > 1 == 2 or error('numbers not equal') Which is how I'...
Peter's user avatar
  • 3,252

15 30 50 per page