Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Also, I'm new to Steam, so I'm not sure how to add this to my "chest". Is there some way that I can modify the code? I'd be interested in enhancing this tool. I'm a coder, but I'm very new to steam.
Thanks,
wally0623
However if the current score is minus (-) and you try to subtract from it, it doesn't work as the string search finds the first minus symbol.
Any ideas as my game counts minus scores and plus scores?
b_display.label = b_display.label .. ' + '
Should become this:
b_display.label = b_display.label .. ' - '
function enter()
if operator == 'add' then
local valueOld = b_standings[designatedPlayer].value
local s = b_display.label
local sn = string.find(s, '+')
local valueNew = string.sub(s, sn + 2, -1)
player_scores[designatedPlayer].score = valueOld + valueNew
updateScores()
elseif operator == 'subtract' then
local valueOld = b_standings[designatedPlayer].value
local s = b_display.label
local sn = string.find(s, '-')
local valueNew = string.sub(s, sn + 2, -1)
player_scores[designatedPlayer].score = valueOld - valueNew
updateScores()
end
end
There's probably better/neater ways but that'll work.
Split this chunk in two:
function enter()
if operator == 'add' or operator == 'subtract' then
local valueOld = b_standings[designatedPlayer].value
local s = b_display.label
local sn = string.find(s, '+')
local valueNew = string.sub(s, sn + 2, -1)
if operator == 'add' then
player_scores[designatedPlayer].score = valueOld + valueNew
elseif operator == 'subtract' then
player_scores[designatedPlayer].score = valueOld - valueNew
end
updateScores()
end
For tinnesaile, to color code the player's name insert this line:
b_standings .color = player_scores .color
or
b_standings .font_color = player_scores .color
between
b_standings .value = player_scores .score
and
self.editButton(b_standings ).
Tryin not to leave anyone out