
Currently, I’ve noticed that broadcastToAll() lines that contain variables are not firing. I have confirmed the variables are good with debug log messages immediately before the errant broadcasts. There is no error, it simply acts as if the line is commented out. I’ve confirmed this behavior via:
log(“bottomFaction: “ .. bottomFaction)
log(“topFaction: “ .. topFaction)
NOT WORKING:
local broadcastString1 = “The Force is with “ .. topFaction .. “.”
local broadcastString2 = bottomFaction .. “ gets first turn.”
broadcastToAll(broadcastString1, “White”)
broadcastToAll(broadcastString2, “White”
WORKING:
broadcastToAll(“The Force is with top faction.”, “White”)
broadcastToAll(“Bottom faction gets first turn.”, “White”)
I’m happy to provide an affected save file, or any other requested details as needed!


i’m unable to reproduce this issue with the following code:
local topFaction = "top"
local bottomFaction = "bottom"
local broadcastString1 = "The force is with " .. topFaction .. "."
local broadcastString2 = bottomFaction .. " gets first turn."
broadcastToAll(broadcastString1, "White")
broadcastToAll(broadcastString2, "White")a save file would be helpful!

Fantastic, I’m happy to provide that.
The code in question is in GameSetup.ttslua, starting at 915. The code is supposed to position and set the state of the current turn marker (that part works), then, set the active player’s End Turn button visible (that part does not work), set the active player’s Board counter to be visible (that part does work), and then broadcast the results (which did not work). Replacing the broadcast string with a string without a variable, or string concatination, causes the broadcast to fire properly. All code beyond the trouble lines run as expected, I receive no lua errors. All debug logs can easily confirm the variables are good before the trouble lines. The only lines in question that are not working are:
buttonEndTurnBottom.setInvisibleTo({})
buttonEndTurnTop.setInvisibleTo(allColors)
and their reverse cases, and,
broadcastToAll(“The Force is with “ .. topFaction .. “.”, “White”)
broadcastToAll(bottomFaction .. “ gets first turn.”, “White”)
broadcastToAll(“The force is with [“ .. Color.fromString(topColor):toHex() .. “]” .. topFaction .. “[-].”, “White”)
broadcastToAll(“[“ .. Color.fromString(bottomColor):toHex() .. “]” .. bottomFaction .. “[-] gets first turn.”, “White”)
Execution instructions to repro the bug:
I truly apologize if I’ve missed something stupid here, but this is pretty basic stuff and all debug logs indicate all my vars are in good shape, and this is a total mystery to me why this basic functionality isn’t firing.
I’m happy to answer any questions you may have!
Thanks again,
NP