General > Developers Corner
Need a tiny bit of help
roastchicken:
--- Quote from: Janjakob2000 on August 07, 2015, 04:07:02 PM ---That doesn't work... :(
--- End quote ---
Saying "that doesn't work" doesn't help other people to figure out WHY it doesn't work so they can help YOU.
Looking at the code now I see I left my CATEGORY_NAME variable in there. I assume that is why it isn't working. Just replace the CATEGORY_NAME on line 13 with a string for the Category name. In my case, it is "Utilities".
JamminR:
Additionally, leaving a variable blank would have indeed caused an error, likely at server startup.
Lua doesn't like nil definitions when you try to load/start them in a function.
Sure, you can assign a variable = nil, but, don't expect to use that variable without defining that and having the code expect that.
Janjakob2000:
--- Quote from: roastchicken on August 08, 2015, 02:39:00 AM ---Saying "that doesn't work" doesn't help other people to figure out WHY it doesn't work so they can help YOU.
Looking at the code now I see I left my CATEGORY_NAME variable in there. I assume that is why it isn't working. Just replace the CATEGORY_NAME on line 13 with a string for the Category name. In my case, it is "Utilities".
--- End quote ---
I was looking at the code why it didn't work, but I didn't see that one, I'll try work on that now.
--- Quote from: JamminR on August 08, 2015, 09:16:28 PM ---Additionally, leaving a variable blank would have indeed caused an error, likely at server startup.
Lua doesn't like nil definitions when you try to load/start them in a function.
Sure, you can assign a variable = nil, but, don't expect to use that variable without defining that and having the code expect that.
--- End quote ---
Yeah, I've kinda experienced that a lot since I've been working with lua.
"Coding is like a book, except when you miss out a single comma on page 126."
Navigation
[0] Message Index
[*] Previous page
Go to full version