16.09.2019, 12:47
(This post was last modified: 16.09.2019, 12:53 by Trond Hoyem.)
(06.09.2019, 08:32)admin Wrote: Use getone() instead of getrow()
Hi
I am now having a similar challenge, but this time with the table I get from the string.split function. I have the following code;
Code:
startHG = string.split(start, '/')
* table:
[1]
* string: 26
[2]
* string: 0
[3]
* string: 0
How can I now get the different values entered in seperate variables? I would like to have a variable for maing group (e.g. mg) that should have the value 26 and so on.
(16.09.2019, 12:47)Trond Hoyem Wrote:(06.09.2019, 08:32)admin Wrote: Use getone() instead of getrow()
Hi
I am now having a similar challenge, but this time with the table I get from the string.split function. I have the following code;
This takes the Group address and splits it to the three values from the addres, giving med the table;Code:startHG = string.split(start, '/')
* table:
[1]
* string: 26
[2]
* string: 0
[3]
* string: 0
How can I now get the different values entered in seperate variables? I would like to have a variable for maing group (e.g. mg) that should have the value 26 and so on.
Nevermind. I found it out by trial and error. The code needs to be;
Code:
startHG = tonumber(string.split(start, '/')[1])
That will get the main group as a number.
There are 10 kinds of people in the world; those who can read binary and those who don't