forums

TNT Basic Forums > Bugs!
Array Problem?
< Last Thread     Next Thread >
Author
Thread        Post A Reply

01-24-2003 19:36

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

When I run my hieroglyph project, hieroglyph freezes up for a few minutes, then displays this alert message:

The TNT Basic Program could not be run.
TNT Basic is not responding.

The TNT application also displays an alert message:

Signal Raised
Condition:Unknown array type in CArrayDimEntry
constructor!

Function:__ct
File:Data_Statements.cpp
Line #49

I can e-mail my code if needed.

By the way, I tried removing the other resources, and it still didn't work.

01-25-2003 09:30

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

I found the problem

I found the source of the problem in my code. (Took me long enough to check the line that TNT said there was a parse error at (in the alert box) :D) I tried to use arrays in an array:

int arrayOne[5]
int arrayTwo[5]
int arrayThree[5,5]

'Here I would assign numbers to each part of both arrays

arrayThree[arrayOne[3],arrayTwo[3]]=0


As I worked to find this problem, I found that using "end proc()" freezes up Hieroglyph too. I finally realized that end proc only uses parenthesis if there is a variable to return.

01-25-2003 11:16

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

wow

Strange code... I guess it might be usefull to assign a proprety to some element... maybe there is an array of 3 enemies, each of one has a head and abody, so in total it' s a 3*2 array. Then I need an array to tell which ones of the enemies have been hit, and another if their head or body or both has been hit...

Naaaaaaaaaa!!!!!!!!!

I really cant see a sense in this, are you doing some chess program? Anyway, it' s seems legitimate to use such a syntax if one needs...
I only got to a[b] while coding

01-25-2003 15:51

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Actually, the array is an array of all the occupied tiles in my map; when someone moves, his previous location, stored in another array, is no longer occupied


int OccupiedTiles[PreviouslyOccupiedX[SpriteID],
PreviouslyOccupiedY[SpriteID]]=0

01-26-2003 20:59

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Array Problems

Hmm... Can you post the exact code that I need to paste into Hieroglyph to cause that dialog to appear in TNT Basic? The example you posted worked fine for me.

As for the end proc using parenthesis with no return value, that should be ok, but if you try it it crashes TNT Basic - oops... I'll fix that - thanks for reporting it!

Cheers,

Mark

01-27-2003 01:09

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Oops

Sorry, I forgot to keep a copy of the old code. When I finally fixed the problem I was so happy that it slipped my mind. I thought that the sample code I posted was the problem, but it works. If I remember the exact problem code I will post it.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.