Comment 27 for bug 1811583

Revision history for this message
kaputtnik (franku) wrote :

I think i found a solution, by using the players send_message function. In file data/scripting/win_condition/territorial_lord.lua, line 53, exchange the line:

send_message(player, game_status.title, msg, {popup = true})

with:

player:send_message(game_status.title, msg, {popup = true})

Made just a short test, which seems to be fine, so please give it a try :-)

If this works, we should may exchange some more places where messages:send_message is used. E.g. the function broadcast() in:

https://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/data/scripting/win_conditions/win_condition_functions.lua#L101

The RST description says it uses 'wl.game.Player.send_message` but in fact it uses messages.send_message().

See also: https://wl.widelands.org/documentation/search/?q=send_message&check_keywords=yes&area=default