Basically, I have loaded variables from a text file into invcontents.
There maybe one or more variables in the text file starting with the prefix "inv_" now, then it uses the for loop to go through everything that starts with, "inv_". After that it checks what text is after "inv_".
Like for example, in the text file I might have this:
inv_item=name,icon,power,blah
After I check if "item=" is after inventory or not or any of the other words after it, I'm creating a substring of everything after the "=" and tokenizing it to turn it into an array.
This is what I'm trying to do, put all the information in the text file AFTER the "itemname=" into an array.
What Stefan suggested, so something like this would be fine?
PHP Code:
with (invcontents)
{
for (i: getstringkeys("this.inv_"))
{
if (i == "item=")
{
tokens = getstringkeys("invcontents.inv_" @ i)
}