Ender's Game revived once more
Moderator: MaxCoderz Staff
-
- Extreme Poster
- Posts: 322
- Joined: Tue 15 Feb, 2005 12:08 am
- Location: Lost in a land of mysteries.....
Invalid Dim usualy means that you went out side of the matrix. check to see what your matrix size is and than do a text command to show where you are at in the matrix.
Join me at:
http://nanotech.pcriot.com
or
http://emancipal.co.nr
Coming soon..
Rewrite 3D Level Editor - 55% done!!
Emancipal - The Creator 5% done
http://nanotech.pcriot.com
or
http://emancipal.co.nr
Coming soon..
Rewrite 3D Level Editor - 55% done!!
Emancipal - The Creator 5% done
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
-
- Extreme Poster
- Posts: 322
- Joined: Tue 15 Feb, 2005 12:08 am
- Location: Lost in a land of mysteries.....
With out seeing the map data or were you are on the screen in your screenshot I think it would be pretty hard for anyone to find the bug.
If you want to find the bug right down how large your matrix is on a piece of paper. Then you use a text command like this to display where your at in the matrix.
I would think a basic coder like yourself would have tried this. I have used this simple debuging rountine to find many errors in my programs.
If you want to find the bug right down how large your matrix is on a piece of paper. Then you use a text command like this to display where your at in the matrix.
Code: Select all
Text(0,0,"X:",Where your at on the matrix X axis.
Text(7,0,"Y:",Where your at on the matrix Y axis.
Join me at:
http://nanotech.pcriot.com
or
http://emancipal.co.nr
Coming soon..
Rewrite 3D Level Editor - 55% done!!
Emancipal - The Creator 5% done
http://nanotech.pcriot.com
or
http://emancipal.co.nr
Coming soon..
Rewrite 3D Level Editor - 55% done!!
Emancipal - The Creator 5% done
Instead of that, use
X where you are on the X, and Y being where you are on the Y (whichever vairable you use), then itlle return it as Xcoord/Ycoord, I think It's easier to understand that way.
Code: Select all
Text(0,0,X,"/",Y
Shaun
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
Nevermind, I guess it's too hard to explain my bug. I know why it goes off the matrix, just not the other part. Normally it can't go off the matrix, there's code to catch that, but it does when values get screwed up. What's happening is as the cursor is brought over a lrge ship, the cursor becomes large and is moved to the top left corner of the ship. The problem is that in certain situations the coordinates aren't changed correctly and the cxursor ends up somewhere it's not supposed to- sometimes off the map, resulting in error.
"You're very clever, young man, but it's turtles all the way down!"
-
- Calc Wizard
- Posts: 526
- Joined: Tue 08 Mar, 2005 1:37 am
- Location: who wants to know?
- Contact:
Or X-8(condition -> Xtokijnct wrote:You could change a few of the if-then booleans if they only contain one command from:
:If etc....
:Then
-8=>X
:End
to...
:If etc...
-8=>X
example:
Code: Select all
If K=24:X-8->X
Code: Select all
X-8(K=24 -> X
orInstead of that, use Text(0,0,X,"/",Y
Code: Select all
Text(0,0,"(",X,",",Y,")
Last edited by DarkerLine on Mon 02 May, 2005 11:30 pm, edited 1 time in total.
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
Essentialy a large number of arithmetic errors. That's what i suspected, the hard part was finding them all. however once I found two of them I knew where to look for the rest. Basically debugging it involved an hour of running the program, looking at the code in graphlink, and making changes to see what difference they made. Anyways, I've got it and I'll give an update in a few hours. Current size: 14673 bytes.
"You're very clever, young man, but it's turtles all the way down!"
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura