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.

DarkBASIC Discussion / Seemingly in-existent, very annoying problem

Author
Message
Yodaman Jer
User Banned
Posted: 26th Jun 2008 05:00
Well, I am currently making a game called Maze O Mania. I've been working on it for about 2 days now. I had everything working and running smooth. Then, I decided to start messing with all of the gosubs/gotos.

For example, I changed this from
if blah blah = blah
then gosub L1I:
to

if blah blah = blah
then GOTO L1I:

I even tried getting rid of the colons, but that didn't work. What happens is the L1I tag is the intro to level 1. If the player loses all lives, it goes back to this screen. It worked perfectly until I messed with the colons. Then it got all screwed over.

Here's my code. I've been staring at it for over two hours.


If someone can please tell me what's wrong, I'd greatly apprciate it. Thanks in advance!


www.freewebs.com/jelproductions/
master programmer
20
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 26th Jun 2008 07:42
I would use gosubs, I mean why even use gotos? And having the colons or not shouldn't matter.

Also, change the code

to


That saved a lot of room.

As far as the goto problem, I'm not entirely sure. I tested some code using colons, without colons, using goto and gosub, etc. It always seemed to work for me, so I have no idea what the problem could be.

Is it coming up with an error message or what isn't working that worked before exactly?

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 26th Jun 2008 09:18
Ok, firstly: Change this



to this:



secondly:change this:



to this:



thirdly, change this:



to this:



Ok, now you have added the RETURN to the code.

Now, put the "MENU" subroutine and the "L1I" subroutine at the bottom of the code, after the last RETURN command of the L1 subroutine.

At the start, gosub the L1, and change all he goto`s to gosub`s.

TheComet

Oooooops!!! I accidentally formated drive c.
Yodaman Jer
User Banned
Posted: 26th Jun 2008 20:16
Quote: "
Is it coming up with an error message or what isn't working that worked before exactly?"


Yes, it is. I thought I said that in my first post, but looking back I see I didn't. sorry!

After the player loses all lives, it's supposed to go to the level intro screen. Like most other games. The tag is L1I for that.
The error message reads:

Runtime Error at line 27: Object does not exists

Sometimes, it will say

Runtime Error at line 23

It's always a runtime error, and it's always in the 20 lines. I don't get it...there's NOT supposed to be an object in that code! GAH!


www.freewebs.com/jelproductions/
master programmer
20
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 26th Jun 2008 21:43
If the object doesn't exist it doesn't seem to be a problem with the gotos and gosubs, it seems to be an object isn't loaded or is misspelled.

As for the runtime error, I don't know. Is there anyway you can put all of the files for that project in a zip file and give it to us so we can test it out with the files you have?

Yodaman Jer
User Banned
Posted: 30th Jun 2008 19:33
Probably, however I am very busy at the moment and will have to stop working on this project for about a month...I'll try to get some time, though.


www.freewebs.com/jelproductions/

Login to post a reply

Server time is: 2025-06-05 23:58:05
Your offset time is: 2025-06-05 23:58:05