Hi, i haven't been around in a while, but I came back here to ask about substrings.
Currently making a remake on the CE of the web game Loop Over (at loopover[dot]xyz) largely to remedy my own boredom. however i have reached an issue where I am trying to store a character from a string at position E into that same string at position D, and so on, sort of cycling certain characters within the string. The code looks like this, with ... representing irrelevant code in-between and // representing comments:
Code:
There are no comments in the actual code, so that is not the cause of the error.
Anyone have any ideas to do what I am trying to do?
Currently making a remake on the CE of the web game Loop Over (at loopover[dot]xyz) largely to remedy my own boredom. however i have reached an issue where I am trying to store a character from a string at position E into that same string at position D, and so on, sort of cycling certain characters within the string. The code looks like this, with ... representing irrelevant code in-between and // representing comments:
Code:
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"->Str1
...
:If K=41 //if math key is pressed
:Then
:1->D
:6->E
:11->F
:16->G
:21->H
:End
:If not(S) and K≥41 //if direction is up+down and the key pressed is not an arrow key
:Then
:sub(Str1,D,1)->sub(Str1,26,1 //errors here
:sub(Str1,E,1)->sub(Str1,D,1
:sub(Str1,F,1)->sub(Str1,E,1
:sub(Str1,G,1)->sub(Str1,F,1
:sub(Str1,H,1)->sub(Str1,G,1
:sub(Str1,26,1)->sub(Str1,H,1
...
There are no comments in the actual code, so that is not the cause of the error.
Anyone have any ideas to do what I am trying to do?