BlueSnoodDude
New member
- Joined
- Dec 6, 2020
- Messages
- 5
So I'm working on a project to make random level designs for games in Monkey X.
The method I'm using is creating an external .txt document which contains values and looks something like the following:
22222222222222222222
27777777777777777772
27777777777777777772
27777777777777777772
27777777727777777772
27777777777777777772
27777771777777777772
27777777777777777772
27777777777277777772
27777777777777777772
27727777777777777772
27777777777777777772
27777777777277777772
27777777777777777772
22222222222222222222
This will then read into Monkey X and it will translate each of these numbers to an allotted sprite.
This all works just fine.
However, I wish for it to randomly generate these files and I have an algorithm designed to make randomly generated files of this structure.
The issue is its not writing correctly, I don't quite know the issue but I assume that its down to it not putting the values in the correct format (as shown above) to be read.
Is anyone able to see the issue:
That is the syntax error I'm having, it says "array index out of range" so I'm assuming that the new randomly generated file isn't formatted correctly.
I'm stumped. I'd be grateful if anyone knows of any solutions.
The method I'm using is creating an external .txt document which contains values and looks something like the following:
22222222222222222222
27777777777777777772
27777777777777777772
27777777777777777772
27777777727777777772
27777777777777777772
27777771777777777772
27777777777777777772
27777777777277777772
27777777777777777772
27727777777777777772
27777777777777777772
27777777777277777772
27777777777777777772
22222222222222222222
This will then read into Monkey X and it will translate each of these numbers to an allotted sprite.
This all works just fine.
However, I wish for it to randomly generate these files and I have an algorithm designed to make randomly generated files of this structure.
The issue is its not writing correctly, I don't quite know the issue but I assume that its down to it not putting the values in the correct format (as shown above) to be read.
Is anyone able to see the issue:
I'm stumped. I'd be grateful if anyone knows of any solutions.