localtc={}functiontc.check(Args,team_list,ii_start,ii_end)localwarn={}localwtotal,dtotal,ltotal=0,0,0localhwtotal,hdtotal,hltotal=0,0,0localawtotal,adtotal,altotal=0,0,0localpkwtotal,pkltotal,otwtotal,otltotal=0,0,0,0localgftotal,gatotal=0,0forii=ii_start,ii_enddo-- First get codelocalteam_code_ii=team_list[ii]ifteam_code_ii~='SPORTS_TABLE_TOTAL'then-- Now tabulate valueswtotal=wtotal+(tonumber(Args['win_'..team_code_ii])or0)dtotal=dtotal+(tonumber(Args['draw_'..team_code_ii])or0)ltotal=ltotal+(tonumber(Args['loss_'..team_code_ii])or0)hwtotal=hwtotal+(tonumber(Args['hwin_'..team_code_ii])or0)hdtotal=hdtotal+(tonumber(Args['hdraw_'..team_code_ii])or0)hltotal=hltotal+(tonumber(Args['hloss_'..team_code_ii])or0)awtotal=awtotal+(tonumber(Args['awin_'..team_code_ii])or0)adtotal=adtotal+(tonumber(Args['adraw_'..team_code_ii])or0)altotal=altotal+(tonumber(Args['aloss_'..team_code_ii])or0)pkwtotal=pkwtotal+(tonumber(Args['PKwin_'..team_code_ii])or0)pkltotal=pkltotal+(tonumber(Args['PKloss_'..team_code_ii])or0)otwtotal=otwtotal+(tonumber(Args['OTwin_'..team_code_ii])or0)otltotal=otltotal+(tonumber(Args['OTloss_'..team_code_ii])or0)gftotal=gftotal+(tonumber(Args['gf_'..team_code_ii])or0)+(tonumber(Args['pf_'..team_code_ii])or0)gatotal=gatotal+(tonumber(Args['ga_'..team_code_ii])or0)+(tonumber(Args['pa_'..team_code_ii])or0)endendifwtotal~=ltotalthentable.insert(warn,wtotal..' total wins != '..ltotal..' total losses')endifhwtotal~=altotalthentable.insert(warn,hwtotal..' total hwins != '..altotal..' total alosses')endifawtotal~=hltotalthentable.insert(warn,awtotal..' total awins != '..hltotal..' total hlosses')endif(2*math.floor(dtotal/2))~=dtotalthentable.insert(warn,dtotal..' total draws is an odd number')endifhdtotal~=adtotalthentable.insert(warn,hdtotal..' total hdraw != '..adtotal..' total adraw')endifpkwtotal~=pkltotalthentable.insert(warn,pkwtotal..' total PKwins != '..pkltotal..' total PKlosses')endifotwtotal~=otltotalthentable.insert(warn,otwtotal..' total OTwins != '..otltotal..' total OTlosses')endifgftotal~=gatotalthentable.insert(warn,gftotal..' total for != '..gatotal..' total against')endreturnwarnendreturntc