#Replacing a certain index in a string without loops

8 messages · Page 1 of 1 (latest)

blazing plover
#

Currently, I have 3 synced string variables that act as synced lists

Each player is supposed to modify their own index, and I dont want to use 3 loops for each list, I just want a player to modify their own index

For example, the Team ID list
0/0/0/0/0/0/0/0

If im at index 2, I want to set the second index in that "List" to my current team ID, for example:
0/0/1/0/0/0/0/0

I'm not sure how to do this without loops, or if its possible

#

Mainly because we dont have String Get All Indices Of, only String Index Of, which will show you the character index of the first match

rare escarp
rare escarp
# blazing plover Currently, I have 3 synced string variables that act as synced lists Each playe...

not flexible, i think anything flexible requires a loop bc u need to account for the length of each string of the element, but this works fine for use with this assuming length of every element is always 1 (+1 bc the divider, which is y 2 is used in the add n multiply). However i puts an extra "/" at the end when at the last index (top of multiply is index)

#

@blazing plover

blazing plover
#

sec

blazing plover
#

You dont need seperators if you know the length of each "Item"