Jump to content
  • Advertisement

Archived

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

KidIcarus

What a stupid error message!

This topic is 6195 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!