-
-
Save SamuXarick/fec557fc8828ab7818842fbb178460ec to your computer and use it in GitHub Desktop.
table entries not iterated in the order they were created
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tables = null; | |
constructor() { | |
tables = { | |
company_value_table = { id = null, el = array(GSCompany.COMPANY_LAST), val = {}, pct = {} }, | |
most_profitable_vehicle = { id = null, el = array(GSCompany.COMPANY_LAST), val = {}, pct = {} }, | |
name3 = { id = null, el = array(GSCompany.COMPANY_LAST), val = {}, pct = {} }, | |
name4 = { id = null, el = array(GSCompany.COMPANY_LAST), val = {}, pct = {} }, | |
name5 = { id = null, el = array(GSCompany.COMPANY_LAST), val = {}, pct = {} }, | |
name6 = { id = null, el = array(GSCompany.COMPANY_LAST), val = {}, pct = {} }, | |
name7 = { id = null, el = array(GSCompany.COMPANY_LAST), val = {}, pct = {} }, | |
}; | |
for (local c_id = GSCompany.COMPANY_FIRST; c_id < GSCompany.COMPANY_LAST; c_id++) { | |
local id = 0; | |
foreach (league_name, league in this.tables) { | |
GSLog.Info("id = " + id + "league_name = " + league_name); | |
league.val.rawset(c_id, [ 0, SetText(GSText.STR_MAIN_EMPTY), SetText(GSText.STR_MAIN_EMPTY) ]); | |
league.pct.rawset(c_id, 0); | |
id++; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment