Does anyone have the/a link for a Standalone Lua Interpreter? And how does it work? I’ve been using the Garry’s Mod console for a while and that takes too long to make a script, start up Garry’s Mod, start up single player, and THEN I’m ready to load scripts. Thanks and many hearts to whoever posts a valid working link and a detailed explanation first /
Run GMod in windowed mode. Test script, alt+tab, alter code, alt+tab, lua_openscript
Or if you’re interested Lua not specifically for GMod then check this out
Firefox says http://luaforwindows.luaforge.net/ is an invalid website.
I’m just looking for a way to test scripts quick and easy without Garry’s Mod.
I DO have Garry’s Mod, but I’m kind of bored with it lately.
This is what I tend to use.
Mind you, Garry’s Mod Lua is a bit different than regular Lua in various ways I can’t be arsed to remember.
Garry added !, !=, &&, &, ||, |, //, /* and */. If you don’t use them, it doesn’t matter.
I’m doing Msg(“Hello World”) and i get input:1: attempt to call global ‘Print’ (a nil value) lol
I think it’s final to say I’m failing
is Msg() a Garry’s Mod only function?
input:2: attempt to call global ‘Msg’ (a nil value)
Lua doesn’t have support for bitwise?
ok thank you
I forgot Lua was case sensitive lol, I was using Print() instead of print()
Are you looking for this?
I’m not sure. What I’m looking for is a way to test my scripts without using Garry’s Mod.
So far this (http://www.lua.org/cgi-bin/demo) is pretty good. the msg() and Msg() don’t work, but I’m trying to manually create it :haw:
if msg() then
I get this error, lol
input:3: stack overflow
I don’t know what a stack overflow is :downs:
For no good reason, yes.
You’re recursively calling msg().
In the Lua demo thing I’m using, input:1: attempt to call global ‘Msg’ (a nil value).
input:1: attempt to call global ‘msg’ (a nil value)
So I tried to recreate it using print() and it didn’t go well due to my limited knowledge of normal Lua.
Any ideas? :keke:
Finally I can test my scripts in real time and fix errors I never figured out before easily
print("I am "…ageboy…"years old!
print(“My brother is “…ageboy…” years old and I am “…agegirl…” years old!”)
Thanks NullPoint, that is basically exactly what I was looking for.
Go learn Lua?
You really have no idea what you’re doing judging by that, so actually learning Lua is probably a good thing to do before you do anything else.
I know Lua when I’m doing it for Garry’s Mod, but not when I’m doing it NORMALLY.
Gmod Lua IS normal Lua, with a few extra functions added it (ok quite alot) and some extra operators. In order to know Gmod Lua you must first know normal Lua.
I know how to do normal things in GMod but not normal things because I learned Gmod lua by looking at other files and editing them until I understood what certain things did.
This is why it’s better to learn Lua first, not Lua + Gmod Lua at the same time. I suppose it’s good that you’re practising normal Lua before going onto more complex GLua scripts.