Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / [U6RC2] For/Next strangeness

Author
Message
aerostudios
8
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 24th May 2014 02:55
Is this not acceptable?

StartPage = 1
NextPage(StartPage)

Function NextPage(StartPage)
StartItem = StartPage * 3 - 2
For i = StartItem to StartItem + 2
..
Next i
ENDFUNCTION

I'm getting an error like:

NextPage:i structure not found...
Green Gandalf
12
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 25th May 2014 16:23
The following runnable version of your code compiles and runs fine here using U77RC7.

+ Code Snippet



Powered by Free Banners
aerostudios
8
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 25th May 2014 17:32
I completely agree; this is pretty rudimentary. So I'm not sure why I was getting a "structure" error. I had to change my code and do it differently to get around it. Funny thing is, I'm using dozens of FOR/NEXT loops with the variable "i" all throughout my code. This was the only piece that gave me problems.
Green Gandalf
12
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 26th May 2014 01:39
Seems like it was in the code that you didn't show us. Can you supply a short snippet that is runnable (in theory) but gives that error?



Powered by Free Banners
aerostudios
8
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 30th May 2014 21:35
Thanks for your willingness to help. I decided to attack the problem in a different way, and have eliminated the problem. I have quite a few other for/next loop scenarios where this problem does not exist. So I'm at a loss as to what was causing the problem. The code was needed to create 3 flight strips in my air traffic control tower simulator's arrival and departure bays. I created individual functions for each strip seperately, creating 3 unique sprites.
Green Gandalf
12
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 1st Jun 2014 00:29
Quote: "So I'm at a loss as to what was causing the problem."


And we certainly can't help without seeing the relevant code. I guess we can assume this is no longer an issue.



Powered by Free Banners
aerostudios
8
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 1st Jun 2014 02:55
Yes, I guess I can say it is no longer an issue. But, if it surfaces again, I'll try and have more code to explore. Thanks for your help at any rate!
Green Gandalf
12
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 2nd Jun 2014 12:41
You're welcome.



Powered by Free Banners

Login to post a reply

Server time is: 2017-11-18 13:48:18
Your offset time is: 2017-11-18 13:48:18