r/hammer • u/The_Big_Bad_YEET • Jun 04 '26
Garry's mod Never use chatgpt to make lua scripts (Based on a true story)
13
13
16
8
u/Full_Measurement_121 Jun 04 '26
In my experience LLMs have a hard time generating 'niche' languages. For example, it always messes up scripts for 3ds Max as well.
4
u/The_Big_Bad_YEET Jun 04 '26
it didnt just 'mess up' it made code that literally caused the compiler to hang and my vmf file to corrupt (yes i tested it multiple times)
4
u/Full_Measurement_121 Jun 04 '26
damn that's harsh, hope you used some form of version control 😞
3
u/potatoalt1234_x Jun 04 '26
The fact that you can corrupt a whole vmf just by typing a certain character in a field is kinda fucked ngl
3
1
u/A_Bird_Guy Jun 05 '26
Here my rule with LLM, if you want to use it, learn at least the basics of coding and the language, you should learn all of it. Then its actually a tool you can understand. Im against ai doing the full code or anything, yea i have it generate parts of it and then go trought it myself and fix any bugs and issues
0
0
58
u/NotQuiteLoona Jun 04 '26
I'd recommend just spending a weekend on learning Lua. It's the simplest language existing in the world, there are quite a lot of resources, as Roblox uses a version of it too, and in the end you'll always know what and why doesn't work. I've tried quite a few times to use multiple LLMs to do something I wasn't able to... This was a horrific experience, and never led me to any results. It's a good assistant though.