For the past week or so, I've been working on a custom-algorithm generated line drawer. For the past 24 hours I've been staring at the code for the file loader and wondering why it won't work.
Even when I'm not converting it though, it comes out with random irrelevant numbers, and when I change the values in the text file, it comes out with the SAME exact thing! D:
I think if your code is the same as mine above, then the file isn't quite what you think it is - maybe they are some other characters in there.
EDIT
Come to think of it - if you subtract 48 from some_value and get -38, as you did in your last test when you changed from 5 to 4 - then the original value was 10
which is the code for Line Feed
So the datafile format is not quite what we think.
It's very late here- going to bed soon.
I take it that you only want to load the first 3 lines (the 600, 550 and 0).
What about the last 3 lines
y/2+20
(x+y)/5
x/2+10
The third line is going to be assigned to the finish counter temporary variable, while the last three lines are going to be respectively assigned to the R, G, and B temporary color algorithm storages.
[code=OctavariumXI ]while the last three lines are going to be respectively assigned to the R, G, and B temporary color algorithm storages.[/code]
You can load those last three lines as strings - but how were you expecting to actually use them
as algorithms?? Have you got some type of expression evaluator