Tables: initializing elements
Posted: Wed Aug 09, 2017 9:59 pm
I need to get a time string, for example: "21:52:20", splitted into a tgree element table.
I get error: "Table field "secs" was not initialized!" pointing the "If" line.
As you can see all three fields were initialized in the constructor:
time = {hour="00", mins="00", secs="00"}
Code: Select all
Function UpdateTime()
time = {hour="00", mins="00", secs="00"}
time = SplitStr(GetTime(True),":")
If time["secs"]= "20" Then mui.Set("sl_min", "value", "20")
EndFunction
As you can see all three fields were initialized in the constructor:
time = {hour="00", mins="00", secs="00"}