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

test scenario: lua error (silly dance) #1678

Closed
matthiaskrgr opened this Issue May 9, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@matthiaskrgr
Contributor

matthiaskrgr commented May 9, 2017

Wesnoth 45c1dec

wesnoth -t
Move unit on "The silly dance" label (14,9)
=>

20170510 00:00:45 error scripting/lua: lua/wml/animate_unit.lua:89: bad argument #2 to 'add' (string expected, got nil)
stack traceback:
	[C]: in method 'add'
	lua/wml/animate_unit.lua:89: in upvalue 'add_animation'
	lua/wml/animate_unit.lua:107: in local 'cmd'
	lua/wml-utils.lua:145: in field 'handle_event_commands'
	lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
@Vultraz

This comment has been minimized.

Show comment
Hide comment
@Vultraz

Vultraz May 9, 2017

Member

The [animate_unit] tag in question is empty, so this is to be expected, I think.

Member

Vultraz commented May 9, 2017

The [animate_unit] tag in question is empty, so this is to be expected, I think.

@CelticMinstrel

This comment has been minimized.

Show comment
Hide comment
@CelticMinstrel

CelticMinstrel May 9, 2017

Member

It should yield a WML error instead of a Lua error, though. In other words, the [animate_unit] implementation should check for this.

(Or maybe it should substitute a default value. I'm not quite sure.)

Member

CelticMinstrel commented May 9, 2017

It should yield a WML error instead of a Lua error, though. In other words, the [animate_unit] implementation should check for this.

(Or maybe it should substitute a default value. I'm not quite sure.)

@Vultraz

This comment has been minimized.

Show comment
Hide comment
@Vultraz

Vultraz May 9, 2017

Member

Could you add that, then?

Member

Vultraz commented May 9, 2017

Could you add that, then?

@Vultraz

This comment has been minimized.

Show comment
Hide comment
@Vultraz

Vultraz May 9, 2017

Member

Though TBH I'm wondering what in hell that code was supposed to do in the first place.. was it a placeholder? Supposed to fire a default anim?

Member

Vultraz commented May 9, 2017

Though TBH I'm wondering what in hell that code was supposed to do in the first place.. was it a placeholder? Supposed to fire a default anim?

@CelticMinstrel

This comment has been minimized.

Show comment
Hide comment
@CelticMinstrel

CelticMinstrel May 9, 2017

Member

I haven't looked at the code, so I don't know.

Member

CelticMinstrel commented May 9, 2017

I haven't looked at the code, so I don't know.

@Vultraz

This comment has been minimized.

Show comment
Hide comment
@Vultraz

Vultraz May 9, 2017

Member

It's literally this:

[event]
    name="moveto"
    first_time_only=no
    [filter]
        x,y=14,9
    [/filter]
    [animate_unit]
    [/animate_unit]
    [allow_undo]
    [/allow_undo]
[/event]
Member

Vultraz commented May 9, 2017

It's literally this:

[event]
    name="moveto"
    first_time_only=no
    [filter]
        x,y=14,9
    [/filter]
    [animate_unit]
    [/animate_unit]
    [allow_undo]
    [/allow_undo]
[/event]
@CelticMinstrel

This comment has been minimized.

Show comment
Hide comment
@CelticMinstrel

CelticMinstrel May 9, 2017

Member

Seems like it must be intentional. Maybe @ln-zookeeper would have some idea? Or we could use blame to find who added that and try to ask them.

Member

CelticMinstrel commented May 9, 2017

Seems like it must be intentional. Maybe @ln-zookeeper would have some idea? Or we could use blame to find who added that and try to ask them.

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