Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

[FIXED] Minor Lua bug with ScenEdit_RunScript()

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [FIXED] Minor Lua bug with ScenEdit_RunScript() Page: [1]
Login
Message << Older Topic   Newer Topic >>
[FIXED] Minor Lua bug with ScenEdit_RunScript() - 5/30/2018 7:21:47 PM   
NimrodX


Posts: 82
Joined: 5/12/2018
Status: offline
This doesn't matter too much but I figured I'd report it anyway since it doesn't match the docs and could be an annoyance in some situations.

quote:

>> ScenEdit_RunScript("cmano_helpers.lua")
ERROR: Could not find a part of the path 'D:\Steam\steamapps\common\Command Modern Air Naval Operations\GameMenu_CMANO\Lua\cmano_helpers.lua'.


It should be (in my case given how I have it installed) looking in 'D:\Steam\steamapps\common\Command Modern Air Naval Operations\Lua\' instead.

It looks like it's trying to load from "Lua" as path relative to the current directory which was apparently set to blabla\GameMenu_CMANO when the autorun.exe launcher thing was run since thats where autorun.exe lives. I'm running this from Steam and that could be part of the issue. (Maybe this doesn't happen in standalone or where command.exe is run directly.)

Normally I'd just never use ScenEdit_RunScript() and would just add the script to the scenario as an attachment, but right now I'm tinkering with writing some new functions and it's easier to edit a file on disk rather than keep pasting stuff into the lua console to test it or attaching an updated file. (The other case where someone might want to use the Lua directory is when they have a bunch of "scenario builder" functions that are like macros to automate scenario editing that don't actually need to be included in the scenario itself.)

< Message edited by Dimitris -- 3/8/2019 10:34:40 AM >
Post #: 1
RE: Minor Lua bug with ScenEdit_RunScript() - 2/15/2019 9:52:40 PM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
This should be fixed in a future build. The code was looking in the current directory (where command was started from) rather than the command folder (where command.exe is). The base code for the method 'runscript' was written awhile back, before the wide use of the "GamenMenus" folders so wasn't so obvious then.
Thus why it didn't work when run from a game menu as it was being start from "<command>/GameMenu_CMANO"

_____________________________

Michael

(in reply to NimrodX)
Post #: 2
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [FIXED] Minor Lua bug with ScenEdit_RunScript() Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.922