Author Topic: Modifying 2 bytes of a value from a value at once, generating an "invalid token"  (Read 11047 times)

0 Members and 3 Guests are viewing this topic.

Offline 133794m3r

  • LV2 Member (Next: 40)
  • **
  • Posts: 21
  • Rating: +1/-3
    • View Profile
Took make it simple, this is the program itself, it is _insanely_ early days, and I was just using a simple string. Just to make sure that I was getting what I got from my c program on my computer. But it is saying "invalid token" at the line I've specified below. I'm trying to modify 2 bytes worth of data at once from the value at the address I specified. I'm going to make this into a subroutine and post it up on the subroutine thread once it's working 100% but it's already not working so well for me.

Code: [Select]
:.RC2
:"SILLY STRING"→Str1
:length(Str1)→L
:Disp L►Frac
:det(L)→S
:det(L)→C
:0→T
:L-1→M
:For(A,0,M)
:InData({Str1+A},T)→D
:If D≠0
:{C+D}{^r}++→{C+D){^r}
:End
:Else
:{Str1+A}→{S+A}
:0→{C}{^r}
:End
:End
:length(S)→L
:L-1→M
:For(A,0,M)
:Disp {S+A}►Frac
:Disp i,{C+A}{^r}►Dec
:End
Generated by SourceCoder (http://sc.cemetech.net)
© 2005-2012 Cemetech (http://www.cemetech.net)
Also to say why I'm doing this, instead of just using RLE or puCrunch, I like range coding, and figured it'd be a nice "first usable program" in axe.

Edit: Changed the posted thing to ascii from source coder, to hopefully make it clearer. Apparently I am the stupid today.
« Last Edit: December 18, 2012, 10:56:07 pm by 133794m3r »

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
The ^r^ is actually supposed to be the superscript r, found under 2nd+Apps(Angle).
In-progress: Graviter (...)

Offline 133794m3r

  • LV2 Member (Next: 40)
  • **
  • Posts: 21
  • Rating: +1/-3
    • View Profile
Crap, SourceCoder didn't post it right... I used it to upload my code. It is the superscript r. I don't know why it didn't post it here... guess it's code isn't right for some reason... That or I don't know how to copy paste right...
Woops, seems I figured out what I did... it doesn't have SMF, I accidently clicked "InvisionBB", so that's why... but yeah... woops. It is a superscript.

Edit: If anyone can delete this entire thing that'd be great, I'm going to just lock it as I'm the stupid... :banghead:

P.S. Sorry for wasting your time anyonen who read this thing.
« Last Edit: December 19, 2012, 04:06:59 pm by 133794m3r »