|
hezukeh Beginner
Joined: 24 Sep 2004 Posts: 14
|
Posted: Thu Sep 30, 2004 7:13 pm
problems with list |
Ok so i made a list of about 222 items and imported it over. I used #additem {listname} {item}.
When i look at the variable in settings and it shows only these two in the list:
@testlist|test1
If i type #show @testlist it shows @testlist once, and test1 about 30 times.
What can I do to fix this? I do not want to use an array, nor do i want the items to be in there 2x. (%additem)
ty ahead of time |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Oct 01, 2004 4:31 am |
Quote: |
Ok so i made a list of about 222 items |
How? Exact commands or method used, but please limit to about 5 items.
Quote: |
and imported it over |
How? Exact commands or method?
Quote: |
#additem {listname} {item} |
Since you ended up with @testlist and test1, I assume you replaced listname with @testlist and item with test1? And probably test2, test3?
Like other variable commands, #ADDITEM supports indirect addressing, so @ should not be included in the name unless you intend the name to be the 'contents of @testlist' rather than 'testlist'.
EXAMPLE:
#UNV listtest
#UNV test1
#ADDI listtest test1
#VAR listtest;#VAR test1
Variable: listtest............test1
Variable test1 not defined
#ADDI @listtest test2
#VAR listtest;#VAR test1
Variable: listtest............test1
Variable: test1...............test2
#ADDI listtest test3
Variable: listtest............test1|test3
Variable: test1...............test2
As you can see, in the second #ADDITEM I used @listtest instead of listtest so it added an item to (and created) @test1, which was the contents of @listtest, rather than to @listtest itself. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
hezukeh Beginner
Joined: 24 Sep 2004 Posts: 14
|
Posted: Fri Oct 01, 2004 6:56 pm |
Ok, this is what I did in notepad:
#class {Test}
#additem {testlist} {test1}
#additem {testlist} {test2}
#additem {testlist} {test3}
...etc until all of the necessary things were put in the list.
#class 0
That's it, then I saved it and went into Settings->File->Import text |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Oct 01, 2004 7:30 pm |
Sorry, I can't see anything wrong. Two suggestions:
1. Don't leave blank lines, such as you have between #CLASS and #ADDITEM.
2. If you are having problems with Import, don't import. Your file is a plain-text script, so either paste the script directly to the command line or paste it to the Editor window (Windows menu), then Send it. 200+ lines would probably be better in the Editor. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
hezukeh Beginner
Joined: 24 Sep 2004 Posts: 14
|
Posted: Fri Oct 01, 2004 7:40 pm |
ok ty. I'm breaking them down into more categorized lists anyways.
|
|
|
|
|
|