Archived

This topic is now archived and is closed to further replies.

KidIcarus

What a stupid error message!

Recommended Posts

KidIcarus    122
Or maybe I''m the one that''s stupid. The fact of the matter is these EXACT lines of code worked on my other program. Bah... if anyone can figure this out, it would be greatly appreciated: For counter = 0 To 1 Line Input #1, blah For iY = 0 To levelYnum Line Input #1, rowline For iX = 0 To levelXnum - 1 xco = Val(Mid$(rowline, (iX * 2), 1)) * 32 yco = Val(Mid$(rowline, (iX * 2) + 1, 1)) * 32 level(iX, iY, counter).x = xco level(iX, iY, counter).y = yco Next iX Next iY Next counter it starts saying things about "invalid command" on the first of those two lines, but since they''re similar i thought I''d throw them both up. Anyways, what this is doing is the "iX" is the loop variable for the map loading function in the X direction. This is analyzing each line (String) and looking at each 2-digit segment to see what tile corresponds. Like I said, this worked before but maybe I don''t see the problem. Please help!

Share this post


Link to post
Share on other sites
KidIcarus    122
Is there no help?? Maybe some more info would help:

the code gets a string, say:

"00,00,00,00,00,00"

xco is supposed to hold each 1st digit
yco holds each 2nd digit.

By using these two values, I find the right tile to place there from the bitmap.

I hope someone can help!!

Share this post


Link to post
Share on other sites