FCH_MERLIN Posted February 5 Posted February 5 Hi all .. I have been trying to get the Moose code working with the VsCode in fact it does very well (when you work with a started Mission and you make a on tha fly debbuging), but when you want to work stand alone (without a mision started), i have an env problem that i can not resolve yet, for wich i have a nil answer, i assume that the problem would be that you cant access (or you dont have set any kind of route in the json setting file) if some of you got any idea of how can i solve the issue to fully work with moose and vs code otside the DCS i'll be very gratefull. I atach 2 pics to show you what im just saying, i asume i have a good json file for the workspace. Quote { "folders": [{ "name": "Missions", "path": "." }, { "name": "vFACH_SCRIPTS", "path": "./vFACH_SCRIPTS" }], "launch": { "version": "0.2.0", "configurations": [ { "name": "launch-lua", "type": "lua", "request": "launch", "workingDirectory": "${workspaceRoot}", "sourceBasePath": "${workspaceRoot}", "executable": "${workspaceRoot}/lua.exe", "cwd": "${workspaceFolder:vFACH_SCRIPTS}", "arguments": "main.lua", "listenPublicly": false, "listenPort": 56789, "encoding": "UTF-8", "env": {} //"envFile": "${workspaceFolder}log.env" }, { "name": "launch-gideros", "type": "lua", "request": "launch", "workingDirectory": "${workspaceRoot}", "giderosPath": "C:/Program Files (x86)/Gideros", "gprojPath": "${workspaceRoot}/GPROJ.gproj", "jumpToGiderosErrorPosition": false, "stopGiderosWhenDebuggerStops": true, "listenPublicly": false, "listenPort": 56789, "encoding": "UTF-8" }, { "name": "wait", "type": "lua", "request": "attach", "workingDirectory": "${workspaceRoot}", "sourceBasePath": "${workspaceRoot}", "listenPublicly": false, "listenPort": 56789, "encoding": "UTF-8" } ] } } thx all Merlin
cfrag Posted February 6 Posted February 6 env isn't initialized inside the Lua context when no mission is running. You can either provide you own stubs if env is nil, or redirect all invocations to env through your own env patch that redefies env and only invokes env methods when a mission is running. 1
ops Posted March 14 Posted March 14 this is impossible. scripts in games are to control the game - when you remove the game part of this, there's nothing left. DCS exposes a lot of classes, modules, functions to the LUA environment it runs the scripts in. All that is obviously missing in a standalone LUA interpreter.
Recommended Posts