SubString Position Questions

ShadowInTheD

Active Member
Reaction score
12
I'm so confused with strings.. Switching the characters in a returned save code is confusing me so bad.

First question: Is the 'c' in the string "abcdefg" == SubString("abcdefg", 2 , 3)?
 
Reaction score
456
Code:
|A|B|C|D|E|F|G|
0 1 2 3 4 5 6 7

a == SubString("abcdefg", 0 , 1)
b == SubString("abcdefg", 1 , 2)
c == SubString("abcdefg", 2 , 3)
d == SubString("abcdefg", 3 , 4)
e == SubString("abcdefg", 4 , 5)
f == SubString("abcdefg", 5 , 6)
g == SubString("abcdefg", 6 , 7)

Yes.
 

Nexor

...
Reaction score
74
you posted only one line, we dont know what charaterposition array is.
What do you want to do with this trigger?
 

ShadowInTheD

Active Member
Reaction score
12
Ok, so I have a string: udg_CodePerPlayer, and I want to switch to characters in this string: 5 and 42.

CharacterPosition = the i'th character in the string, i.e. CharacterPosition[5] = 5th character in the string.
 

Rainther

I guess I should write something of value here...
Reaction score
61
If I understand right; you should have an other variable to store one of these values, I doubt it's as easy as switching places with these two and keep their original values. Haven't worked with this yet, so I might be wrong.
 

ShadowInTheD

Active Member
Reaction score
12
That gives me an amazing idea..

Why don't I just add all of the CharacterPosition together instead of switching just 10 characters..
 

Rainther

I guess I should write something of value here...
Reaction score
61
Am not quite sure what you're meaning. But aslong as you got helped I'm satisfied. :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top