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

Lua error when setting music track if there are no music tracks playing #3194

Closed
shikadiqueen opened this Issue May 30, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@shikadiqueen
Member

shikadiqueen commented May 30, 2018

If you don't have any music tracks installed and WML tries to set the current music track using immediate=yes and append=no (other combinations seem to work fine), this will happen:

20180529 21:42:59 error scripting/lua: In function lua_kernel::run(): Lua Error:
  When executing, Lua runtime error: lua/wml-tags.lua:281: Error: Attempted to access an invalid music track.

The easiest way to reproduce is to rename the core music directory, launch Wesnoth, go into a scenario, and use :lua to run this code:

wesnoth.wml_actions.music { name="silence.ogg", immediate=true, append=false }

(Originally reported downstream as project-ethea/Invasion_from_the_Unknown#56.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment