B4X:
For Each TotalPlayer As String In TS.Players
Dim Sum As Int = SumAll(TotalPlayer, TS.Multiplier)
Wait For (SumAll(TotalPlayer, TS.Multiplier)) Complete (Sum As Int) 'This should throw a waring but doesn't and thus breaks program flow.
Dim SB As StringBuilder
SB.Initialize
SB.Append($"${TotalPlayer}'s Total:"$)
' SB.Append(CRLF)
' SB.Append($"Total:"$)
SB.Append(CRLF)
SB.Append(NumberFormat(Sum * TS.Multiplier,0,2))
Log (SB.ToString)
PTCLV.AddTextItem(SB.ToString, "")
Next
I was wondering why my code wasn't running until I saw that I had a Wait For call to a Sub that isn't Resumable. I think the IDE should throw a warning if it detects this as using Wait For on a non-Resumable Sub breaks the program flow.