"Lua Coroutine Failed" as Inbox Message

Bug #1759857 reported by C. T. F.
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

When playing the "territorial lord" mode (I used it in single-player mode) and you managed to get 50% of the land under your control, you have to wait for 20 minutes. At the end of the first 15 minutes there was a pop-up message in my inbox saying that there was a error in Lua.
The heading is "Lua Coroutine Failed" and the body shows me some additional information:

[/build/widelands-19+repacks/src/scripting/lua_error
[string
"script/win_conditions/territorial_lord.lua..."]:132
attempt to compare number with nil
(I think there is some more content in the first / third row, but it's out of the view)

It's weird that the player get such a message as inbox message (with the type "undefined").
I hope I was able to help somebody fixing it. ^^

Tags: wincondition

Related branches

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for reporting!

It's this loop:

               if teampoints[t] > ( #fields / 2 ) then
                  -- this team owns more than half of the map's area
                  foundcandidate = true
                  if candidateisteam == true and currentcandidate == t then
                     remaining_time = remaining_time - 30
                  else
                     currentcandidate = t
                     candidateisteam = true
                     remaining_time = 20 * 60 -- 20 minutes
                  end
               end

line 132 in the current development version, so the bug is probably still there.

Changed in widelands:
milestone: none → build20-rc1
tags: added: wincondition
Changed in widelands:
importance: Undecided → High
Revision history for this message
GunChleoc (gunchleoc) wrote :

Typo, line 131

GunChleoc (gunchleoc)
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
GunChleoc (gunchleoc)
Changed in widelands:
status: New → In Progress
Notabilis (notabilis27)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.