-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dcs.action.DoScript error #179
Comments
Okay, discovered the error. Don't use the def respawn_trigger(m,groupName):
lua_script = f"if not Group.getByName('"+groupName+"') then\n mist.respawnGroup('"+groupName+"', true)\nend"
trig_respawn = dcs.triggers.TriggerContinious(comment='respawn '+groupName)
trig_respawn.actions.append(dcs.action.DoScript(String(lua_script)))
m.triggerrules.triggers.append(trig_respawn) |
I think the type annotation (and therefore the default constructor) are probably wrong and this is supposed to be Line 385 in 2b4eb8b
You changing from |
Yes that was part of the issue as well. I tried String() earlier and it still didn't work. |
Worth reopening to get the default fixed IMO. I don't have those powers :) |
Hi,
Trying to execute a simple MIST script to respawn aircraft. I have successfully loaded the MIST.lua at mission start. However when I want to execute using the
DoScript
function, in DCS I get a "DictKey_Translation_7" in the text box.Python script:
The end result in DCS is a "DictKey_Translation_7" as the text for the DoScript action.
Also, for more info. Here is my dictionary file from the .miz. I am only calling the respawn_trigger function once, however there are two DictKeys in the file?
The text was updated successfully, but these errors were encountered: