Top "Lua" questions

Lua is a powerful, fast, lightweight, embeddable scripting language.

Does Lua have OR comparisons?

I'm just starting out using Lua, and I was wondering (because I can't find it on the website) if Lua …

if-statement lua logic
Can I check strings equality in lua?

Just a straight forward beginner question, I am coding Lua stuff for Garrys Mod, learning by reading wiki and other …

string lua comparison equals
How to check if two Torch tensors or matrices are equal?

I need a Torch command that checks if two tensors have the same content, and returns TRUE if they have …

lua torch
Safely remove items from an array table while iterating

This question is similar to How can I safely iterate a lua table while keys are being removed but distinctly …

lua
Inline conditions in Lua (a == b ? "yes" : "no")?

Is there anyway to use inline conditions in Lua? Such as: print("blah: " .. (a == true ? "blah" : "nahblah"))

lua conditional ternary
In Lua how do you import modules?

Do you use require "name" or local name = require "name" Also, do you explicitly declare system modules as local variables? …

import module lua declaration require
Best tool(s) for decompiling Lua bytecode?

I am really having trouble finding a good working Lua bytecode decompiler. I'm trying to decompile some scripting files I …

scripting lua bytecode decompiling
Lua pattern matching vs. regular expressions

I'm currently learning lua. regarding pattern-matching in lua I found the following sentence in the lua documentation on lua.org: …

regex lua lua-patterns
how to delete all elements in a Lua table?

How do I delete all elements inside a Lua table? I don't want to do: t = {} table.insert(t, 1) t = {} …

lua lua-table
if, else, else if and end Lua

Any idea why this is wrong in Lua? if Pieza == 1 then if Rotacion == 1 then Piezas = Cuadrado1 else if Rotacion == 2 then …

lua if-statement