Jump to content
UBot Underground

Subtract list my script is not working ?


Recommended Posts

Hi all

 

Got a proble with $subtract lists  :

 

I have a list A   :

 

a

b

c

d

e

 

I have a list b   :

 

b

c

d

 

i want a list C  = listA  - listB

 

a

e

 

so i use $subtract lists

 

here is my code :

 

clear list(%listA)
clear list(%listB)
clear list(%listC)
add item to list(%listA$list from file("{$special folder("Application")}\\listA.txt"), "Delete""Global")
add item to list(%listB$list from file("{$special folder("Application")}\\listB.txt"), "Delete""Global")
add item to list(%listC$subtract lists(%listA%listB), "Delete""Global")
set(#listC%listC"Global")

 

Strangely the ListC =

 

a

b

c

d

e

 

 

Is this normal ?

Link to post
Share on other sites

You should use command "add itemS to list" instead of "add item to list"!

 

"add item" only adds one item, so in your case every list had one item, and all were different...so UBot returned the ListC which was correct behaviour for your code.

 

Here is a quick example:

clear list(%A)
clear list(%
clear list(%C)
add list to list(%A, $list from text("a
b
c
d
e", $new line), "Delete", "Global")
add list to list(%B, $list from text("b
c
d", $new line), "Delete", "Global")
add list to list(%B, $list from text("b
c
d", $new line), "Delete", "Global")
add list to list(%C, $subtract lists(%A, %, "Delete", "Global")

Link to post
Share on other sites
  • 2 weeks later...

$subtract lists

only works with small lists

i was try that many times  with liste around 1k  and this was never working for me

Link to post
Share on other sites

$subtract lists

only works with small lists

i was try that many times  with liste around 1k  and this was never working for me

 

I have used the subtract feature / command on lists 30/40k +. It takes a while but it preforms the action.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...