Jump to content
UBot Underground

Add 1 To Char Count Position ?


Recommended Posts

This must be simple but I just cant get the syntax

 

I want to add +1 to a position, the variable holds the amount of characters so I can insert or add the next list item to #charCountPos1 but I need to add a space so the two list items are separated.

 

set(#listItem2,$insert text(#listItem2,$next list item(%listList),#charCountPos1),"Global")

 

I could pad the list item but that seems a bit of a waste of code.

 

 

Stay Safe

Link to post
Share on other sites

if i get it right, you are looking for

 

increment(#charCountPos1)

 

if not, and if you want to just add some text to a text, you could do it like

 

set(#new,$nothing,"Global")
set(#one,0,"Global")
set(#rand,$rand(3,9),"Global")
loop(#rand) {
    increment(#one)
    set(#addd,$text length(#new),"Global")
    set(#new,$insert text(#new,"{#one}|",#addd),"Global")
}
alert(#new)

Link to post
Share on other sites

if i get it right, you are looking for

 

increment(#charCountPos1)

 

if not, and if you want to just add some text to a text, you could do it like

 

set(#new,$nothing,"Global")

set(#one,0,"Global")

set(#rand,$rand(3,9),"Global")

loop(#rand) {

    increment(#one)

    set(#addd,$text length(#new),"Global")

    set(#new,$insert text(#new,"{#one}|",#addd),"Global")

}

alert(#new)

 

Thanks man I'll give it a go :)

Link to post
Share on other sites
set(#charCount,5,"Global")
set(#listItem2,$insert text(#listItem2,$next list item(%listList),$add(#charCount,1)),"Global")

 

  • Like 1
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...