- String problem [Solved (to an extent)]
- 04 Oct 2007 02:55:16 pm
- Last edited by GenericUser1 on 04 Oct 2007 05:07:53 pm; edited 2 times in total
OK, I have this code:
Code:
And I need it corrected. More specifically the 3rd to last line, teh one with all the sub(s WHat it is suppoesed to do is take the cursor's position (D = UP and Down, E= Left and right), along with the centerpoint (F, should be (5,8) on the screen if you were to plot it, 72 on an 16*8 map), the width of the map (∟EDIT(2)) and the Str2 as the map itself. G is the point in Str1 of which I am trying to move to the point of the cursor. Any one have an idea?
[Edit]
Solved. Figured it out (to an extent).
Code:
:¦ If θ=22
:¦ Then
:¦ Output(5,7,"< >
:¦ Repeat Z=22
:¦ ¦ Output(5,8,sub(Str1,G,1
:¦ ¦ getKey→Z
:¦ ¦ Repeat Z
:¦ ¦ ¦ getKey→Z
:¦ ¦ End
:¦ ¦ G-(Z=24 and G≠1)+(Z=26 and G+1≤length(Str1))→G
:¦ ¦ If Z=21
:¦ ¦ sub(Str2,1,F-(5-D)∟EDIT(2)-E-5)+sub(Str1,G,1)+sub(Str2,F-(5-D)∟EDIT(2)-E-3,length(Str2)-length(sub(Str2,1,F-(5-D)∟EDIT(2)-E-3)))→Str2
:¦ End
:End
And I need it corrected. More specifically the 3rd to last line, teh one with all the sub(s WHat it is suppoesed to do is take the cursor's position (D = UP and Down, E= Left and right), along with the centerpoint (F, should be (5,8) on the screen if you were to plot it, 72 on an 16*8 map), the width of the map (∟EDIT(2)) and the Str2 as the map itself. G is the point in Str1 of which I am trying to move to the point of the cursor. Any one have an idea?
[Edit]
Solved. Figured it out (to an extent).