Jump to content
UBot Underground

How do I do next list item which would be located to a variable?


Recommended Posts

I've got custom usernames set up to a button, but I need these usernames to be entered one by one when creating account. So I want a list total of the custom names.

 

Where do I start

Link to post
Share on other sites

Your question isn't quite clear to me.  Not sure how you get a list of names 'set up to a button'

 

In UBot, multiple items are usually stored in lists or tables.  To process them one at a time, you use a Loop command.

To find out how many items are in a list, you use the $List Total command.

$list total is often used in the top of the loop to tell it how many times to repeat. (once fore each item in the list)

 

If you have items already in a list, and you just want it's total, you can't just drag $list total into your script.  You have to drag it into a command which will accept its value like a Set command or a UI Stat Monitor.

 

Forgive me if I didn't help you at all, but as I said.... wasn't really clear what you were asking.

 

Edit: one more thing (based on the 'title' of your post)  The following would set a variable to the 'next item' in your list each time you clicked it.

ui button("Set Next") {
    set(#Next Item$next list item(%usernames), "Global")
}

 

No loop required..... $next list item increments automatically each time it is accessed.

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...