Search found 23 matches

by bearhunter007
Mon Jan 10, 2022 10:01 pm
Forum: Lua Legion
Topic: Syntax Error
Replies: 4
Views: 323

RE: Syntax Error



Thanks for the feedback Knighthawk, it's been some time since I've used LUA.
by bearhunter007
Sun Jan 09, 2022 11:07 pm
Forum: Lua Legion
Topic: Syntax Error
Replies: 4
Views: 323

RE: Syntax Error

<r> Not content with dealing with the above issue I tried Jan Masterson's code for a circle of units<br/>
<br/>
I get the following error: unexpected symbol near '<\226>'<br/>
<br/>
function draw_circle_of_units(a,b,t,txt)<br/>
if txt == nil then<br/>
txt = ""<br/>
end<br/>
t = t - 1<br ...
by bearhunter007
Sun Jan 09, 2022 9:37 pm
Forum: Lua Legion
Topic: Syntax Error
Replies: 4
Views: 323

Syntax Error

<t> I have used the following code with success in the old version ie. command: modern naval/air ops.<br/>
<br/>
However with the new version I get the following:<br/>
<br/>
ERROR: [string "Console"]:3: syntax error near 'u'<br/>
<br/>
local u= ScenEdit_GetReferencePoint({guid='9QYU5K ...
by bearhunter007
Tue Mar 24, 2020 1:47 pm
Forum: Command: Modern Operations series
Topic: Using the LUA console
Replies: 9
Views: 937

RE: Using the LUA console

Ed49601

The "Lua Legion" is a great resource for developing your command lua skills. Apache85 has lots of code segments that you can copy and use and/or modify for your purposes.

Good luck!

by bearhunter007
Fri Mar 20, 2020 3:15 pm
Forum: Lua Legion
Topic: Getting Highlighted Reference Points
Replies: 5
Views: 288

RE: Getting Highlighted Reference Points

<r> Thanks Michael I realized I had several syntax errors.<br/>
<br/>
Here is the corrected code that works:<br/>
<br/>
--Get all Highlighted Reference Points<br/>
local u = VP_GetSide({Side ='Vietnam'}) -- a side object<br/>
--print(u.rps)<br/>
<br/>
tbl={}<br/>
tbl=u.rps<br/>
--print(tbl ...
by bearhunter007
Thu Mar 19, 2020 11:28 pm
Forum: Lua Legion
Topic: Getting Highlighted Reference Points
Replies: 5
Views: 288

RE: Getting Highlighted Reference Points

Eboreg

Thanks for the reply. I initially tried 'true' but it did not work.

by bearhunter007
Thu Mar 19, 2020 7:07 pm
Forum: Lua Legion
Topic: Getting Highlighted Reference Points
Replies: 5
Views: 288

Getting Highlighted Reference Points

<r> The code below works as far as getting the number of Reference points and whether they are highlighted. It fails on the logic test of whether zz='Yes'. What am I missing?<br/>
<br/>
<br/>
<br/>
--Get all Highlighted Reference Points<br/>
local u = VP_GetSide({Side ='Vietnam'}) -- a side ...
by bearhunter007
Thu May 23, 2019 1:55 am
Forum: Command: Modern Operations series
Topic: Commercial Raider/Attack Ship
Replies: 1
Views: 80

Commercial Raider/Attack Ship

<t> Building a commercial raider. I can add a containerized Kalibr but when I add a Scan Eagle Drone to the Scenario I find I can't make the container ship a homebase for the eagle.<br/>
<br/>
Video I've seen shows that the scan eagle is trapped by a wire on a pole so it doesn't require air ...
by bearhunter007
Mon Mar 18, 2019 5:00 pm
Forum: Mods and Scenarios
Topic: Thread for DB3000 database problems, updates or issues
Replies: 7411
Views: 286453

RE: Requests for DB3000 entries

<r> Just working up a Scenario involving the Taruntal V class boats of Vietnam. I noticed that they have only 10 or so tons of fuel vs the earlier boats having 50 tons of fuel. They should have a range of 1700 nm.<br/>
<br/>
Here is a link:<URL url="https://en.wikipedia.org/wiki/Tarantul-class ...
by bearhunter007
Mon Nov 27, 2017 6:02 pm
Forum: Mods and Scenarios
Topic: Land facility not seen?
Replies: 6
Views: 179

RE: Land facility not seen?

Good Question? How does autodetect work exactly?

Thanks in advance.
by bearhunter007
Wed Nov 08, 2017 6:40 pm
Forum: Mods and Scenarios
Topic: Merchant creation script not working?
Replies: 11
Views: 293

RE: Merchant creation script not working?

Nice script there jmax. Always helps to look at others code to learn from.

Cheers
by bearhunter007
Sun Apr 23, 2017 4:36 pm
Forum: Mods and Scenarios
Topic: Including/Scripting A Yes/No Option in a Scenario
Replies: 12
Views: 278

RE: Including/Scripting A Yes/No Option in a Scenario

Michael,

Thanks for posting your script. I especially like how you detail the use of a custom table. Tables are a unique feature of the LUA language.

by bearhunter007
Sun Apr 02, 2017 7:24 pm
Forum: Mods and Scenarios
Topic: LUA Syntax Help
Replies: 1
Views: 132

LUA Syntax Help

When I run the following command in the script console I get and error. The error says expected ")" before the equals sign.

local mission = ScenEdit_AddMission('Merchant','Merchant05A','Support',zone={"CR-02","CR-03","CR-04"})

Any suggestions?

Thanks
by bearhunter007
Sat Apr 01, 2017 7:44 pm
Forum: Command: Modern Operations series
Topic: Setting course/speed with lua script?
Replies: 24
Views: 2013

RE: Setting course/speed with lua script?

Michael other Lua expert,

With the release of Version 1.11 SR7 is it now possible to set the speed of the unit? Alternatively could you set the throttle?

Thanks
by bearhunter007
Mon Mar 27, 2017 7:08 pm
Forum: Mods and Scenarios
Topic: Using Lua to Call Specific Mounts
Replies: 5
Views: 172

RE: Using Lua to Call Specific Mounts

Michael,

Thanks for documenting your code. It's a simple script for you but "tables" are different then the arrays I'm used to working with in c and vba.
by bearhunter007
Sun Mar 26, 2017 12:47 pm
Forum: Mods and Scenarios
Topic: Lua Question - return to port?
Replies: 4
Views: 158

RE: Lua Question - return to port?

Thanks Michael
by bearhunter007
Sat Mar 25, 2017 5:15 pm
Forum: Mods and Scenarios
Topic: Lua Question - return to port?
Replies: 4
Views: 158

RE: Lua Question - return to port?

Good question Gunner98. Maybe michaelm can help out.
by bearhunter007
Sun Mar 19, 2017 7:12 pm
Forum: Mods and Scenarios
Topic: LUA Scenedit_AddUnit vs. Scenedit_SetUnit
Replies: 1
Views: 149

LUA Scenedit_AddUnit vs. Scenedit_SetUnit

<t> As I understand it from the commandlua.github.io website you can add a unit and set its base for a new unit. However you can only read the base for a unit with the Scenedit_SetUnit() function.<br/>
<br/>
Is my interpretation of the "NewUnit" vs "Unit" arguments in the respective functions ...
by bearhunter007
Fri Mar 17, 2017 3:39 pm
Forum: Mods and Scenarios
Topic: Getting Scripts/Conditions to activate other events
Replies: 10
Views: 221

RE: Getting Scripts/Conditions to activate other events

To clarify, what triggers this final version of the lua script? Does this run continuously in the background?

Thanks in advance Apache85.

Go to advanced search