What program do you use to write Lua?
#1
I'm new to Lua and mcsever so I'm wondering what you guys use to write Lua, is there any ide that can use the docs to make plugin writing easier?
Reply
Thanks given by:
#2
Hello, welcome to the forum.

I personally use ZeroBraneStudio; I've also written a guide on how to set it up so that you can debug plugins directly in the server, and so that ZBS provides MCServer-specific code-completion. You can find it in the online Lua API reference:
http://mc-server.xoft.cz/LuaAPI/
Specifically the article: http://mc-server.xoft.cz/LuaAPI/SettingUpZeroBrane.html

I've used Decoda in the past, there's also an article on setting that up. However, I've found that ZeroBraneStudio is better for my style of programming. Additionally, it's also multi-platform.
Note: ZBS is free; but it will ask you for donation once, when you click the Download button on their webpage. It won't nag you anymore and it is full featured even without payment.
Reply
Thanks given by:
#3
I use decoda, quite simple and powerful.
Reply
Thanks given by:
#4
Okay so I started using ZeroBane, everything seems pretty good except when typing out functions it doesn't tell me what parameters are required, is this normal?
Reply
Thanks given by:
#5
Yes, that's normal, because in Lua the parameters are somewhat "fuzzy". There's no such thing as parameter types, a function can check what type of parameter it received and behave completely different on various types. Also the number of params is arbitrary in the core Lua language - if a function wants more params than it received, Lua will fill the "missing" parameters with nil values. And if you pass more values than a function expects, they will get silently discarded.

That said, most functions in MCServer interface are pretty strict about their parameters, so you should consult the API docs closely. Most of the time you'll get a warning at runtime if you try to pass the wrong parameter type.

If you followed the article on setting up ZBS, you should have a basic code completion. For me it works about 50% of the time, listing the function parameters; the other 50% it's completely silent. Better than nothing Smile
Reply
Thanks given by:
#6
Haha better than nothing, I agree, well thanks!
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)