Jump to content

API/Sim_ControlAPI.html mistakenly calls net.dostring_in() obsolete


Recommended Posts

Posted

The documentation for net.dostring_in() in %DCS_INSTALL_DIR%/API/Sim_ControlAPI.html was updated with 2.9.18.12722. Now, it calls net.dostring_in() obsolete:

Quote

net.dostring_in(state, string) -> string

OBSOLETE and UNSAFE!!! Executes a lua-string in a given internal lua-state and returns a string result

[...]

NOTE: There's no need for net.dostring_in anymore. You can return values from a_do_script() mission scripting API directly:

  local a, b, c = a_do_script("return 1,2,3")

This is blatantly wrong. Any advanced scripting is dependent on net.dostring_in(). a_do_script() is no substitute whatsoever. Three examples: Olympus, DCSServerBot, and Lua Consoles require net.dostring_in(). The latter two actually exemplify how both functions are used together.

I sincerely hope that this is just a documentation error and not a symptom of a lack of understanding of DCS' scripting engine by the developers. Removing this function would break many applications of Lua scripting that go beyond simple mission scripting. To avoid any misunderstanding, please fix the documentation.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...