Welcome aboard Visitor...

Daily Screenshot

Server Costs Target


84% of target met.

Latest Topics

- so i talked with Massi »
- See Commands »
- Now the fun begins »
- Qand answers have returned »
- Call to Arms »
- All Species 8572 Report in »
- hi there »
- Anyone still playing from a decade ago or longer? »
- Game still active. NICE! »
- help me »

Development Blog

- Roadmap »
- Hello strangers, it’s been a while... »
- State of DarkSpace Development »
- Potential planetary interdictor changes! »
- The Silent Cartographer »

Combat Kills

Combat kills in last 24 hours:
No kills today... yet.

Upcoming Events

- Weekly DarkSpace
11/23/24 +1.1 Days

Search

Anniversaries

No anniversaries today.

Social Media

Why not join us on Discord for a chat, or follow us on Twitter or Facebook for more information and fan updates?

Network

DarkSpace
DarkSpace - Beta
Palestar

[FAQ
Forum Index » » Basic Scripting Discussion » » [INFO] What you need to get started.
 Author [INFO] What you need to get started.
Chromix
Cadet

Joined: June 29, 2001
Posts: 3052
Posted: 2003-02-09 10:24   
The LUA-Manual, Chapter 1 to 2.7, aswell as the library functions in chapter 5. Quite a nice reference when printed out, so for that purpose grab the PDF or PS version.


The LUA-Binaries, LuaC.exe to syntax-check and compile your scripts and Lua.exe to execute them without needing to start up DarkSpace.
They are console applications, so you should check their commandline parameters. You can get both here.


A decent editor which supports LUA-Syntax highlighting.

Theres a commercial editor named ZeusEdit which has a free demo, grab it here: http://www.zeusedit.com
Settings for ZeusEdit in the Compileroptions menu:
Command Line: x:whereEverYouPutItluac -p $FN
Lines Regex: line [0-9]+
Errors Regex: luac:

Also in "compiler output" below check "display on errors or warnings"
With this settings you can simply hit ALT - F10 and you get a "build successfull" in the infobar, or a window pops up telling you where the error is.

Also there is a nice freeware editor you can get here:
http://www.crimsoneditor.com. It supports custom syntax highlighting, colors, macros, programs and so on.
It needs a Lua-Syntaxfile to highlight the LUA-Syntax correctly, grab it here.
It contains two folders which match those in the CrimsonEditor installation directory, so simply put those files there.
If it doesn´t work automatically after restarting the editor and opening a .lua file you need to manually activate the lua syntax highlighting in the preferences menu.
Then you just need to add "luac" as new macro so you can syntax check your scripts with a single keypress.

There's also LuaIDE, which is a nice choice if you want to debug Lua scripts the easy way.

After installing everything it´d be a good idea to try the examples from the manual.


[ This Message was edited by: Chromix on 2004-03-02 02:12 ]

[ This Message was edited by: Chromix on 2004-03-05 13:07 ]
_________________


  Email Chromix
Chromix
Cadet

Joined: June 29, 2001
Posts: 3052
Posted: 2003-11-29 04:54   
Removed the book link as it was no longer valid.
Added the Lua tutorial directory instead:
http://lua-users.org/wiki/TutorialDirectory

[ This Message was edited by: Chromix on 2004-04-27 23:22 ]
_________________


  Email Chromix
Chromix
Cadet

Joined: June 29, 2001
Posts: 3052
Posted: 2003-12-09 11:51   
Here is a little Lua test utility I wrote.
It doesn't have syntax highlighting but may be pretty nice to try some things quickly.
_________________


  Email Chromix
Chromix
Cadet

Joined: June 29, 2001
Posts: 3052
Posted: 2004-01-14 16:52   
This it a small script snippet I wrote which prevents usage of variables that haven't been "declared" before.
Might help you to locate typos in variable names within your script more quickly.
_________________


  Email Chromix
Chromix
Cadet

Joined: June 29, 2001
Posts: 3052
Posted: 2004-08-12 03:14   
The Book Programming in Lua is available online.
http://www.lua.org/pil/

It does not explain basic programming, but it explains lua in quite some detail.
_________________


  Email Chromix
Chromix
Cadet

Joined: June 29, 2001
Posts: 3052
Posted: 2004-11-16 05:46   
Here is a utility that helps you find mistyped variable names.
My selfwritten scriptsnippet above just finds them at runtime.
This one here should find all of them before actually running it, but it seems to be less generic.
http://lua-users.org/wiki/LuaLint


_________________


  Email Chromix
Chromix
Cadet

Joined: June 29, 2001
Posts: 3052
Posted: 2005-02-01 01:49   
Here's a Lua IDE (early beta) that looks quite promising.
B:Lua
_________________


  Email Chromix
Page created in 0.017072 seconds.


Copyright © 2000 - 2024 Palestar Inc. All rights reserved worldwide.
Terms of use - DarkSpace is a Registered Trademark of PALESTAR