|
Post by Quintaxel on Nov 16, 2021 16:43:14 GMT 1
Necessary indeed when having lots of units and ScriptID's. Especially in case of reworking old maps and you forgot who's where and what's how I often put that info in a separate txt-file (and add commands, so i know/remember what area they were attacking or swarming to). Just another way of working, i guess. I learned the hard way that planning and keeping track of the status of a project can save a lot of frustration and extra work. I also keep notes with screenshots. I use Joplin for this.
|
|
|
Post by [BMG]Neutro on Mar 20, 2022 14:34:40 GMT 1
Hi, I would like to add comments to individual script lines or functions in a Lua script.
in the following example you can see the comment marks at different possible positions in the script. ( i would prefer the position at the beginning of the line )
which of the example positions are possible so that the script still works without problems? ( does the position of the comment in the script affect the functionality of the script? )
function Check_Player() --(1)----(2)-- function Check_Player()
----------------------------
function Check_Player()
--(3)-- sas = 0 sae = sps - 1 --(4)-- sbs = sps
----------------------------------------[ -- NOTES -- ]---------------------------------------- --[1]-- This function displays a "Welcome/Info" message
|
|
kaoz
General
inter faesces et urinam nascimur
Posts: 1,086
|
Post by kaoz on Mar 21, 2022 1:44:53 GMT 1
which of the example positions are possible so that the script still works without problems? ( does the position of the comment in the script affect the functionality of the script? )
Both positions are possible; everything you place between -- will be ignored --
Doesn't matter where 
Best to use a lua-editor like SciTE Editor: it will show your comments in grey color.
|
|
|
Post by chulefei on Jun 1, 2022 2:53:03 GMT 1
Hello Quintaxel
Recently,When I made some oil consumption code for my Berlin Campaign。I found you have already did it。 It is really interesting,I combine your code with mine,and plan to use them in My Berlin Campaign。 Especially I improved the recfuel function and the also make a system like “Fuel station <- >Fuel Truck <-> Tank”, the Fuel station will be the key point that should be considered with high priority。 I hope this will make BK more funny。
Really nice work you have done Quintaxel。
|
|