local gold = guild:match(goldLoot) or 0
local silver = guild:match(silverLoot) or 0
local copper = guild:match(copperLoot) or 0
local currentTotal = (gold*1000) + (silver*100) + copper
oh yes, you can mix logic and math together like that :)
it's not the logic i was concerned about, it was the use of strings in math operations. i guess lua does an implied "tonumber()" on math operands? i wasn't sure. i know i've gone absolutely crazy pulling "numbers" from strings and using them as things like table indices and couldn't for the life of me figure out why things weren't working right.