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.

Author
Message
Flamertor
14
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 12th Oct 2011 23:53
Im having problem with my coding and i don\'t know how to fix it. Chould someone look at it please. Thank you.
SH4773R
16
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 13th Oct 2011 00:42
What exactly is your problem?

Lucas Tiridath
AGK Developer
17
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 13th Oct 2011 01:13 Edited at: 13th Oct 2011 01:14
Hi there Flamertor. Like SH4773R says, it would help if you told us what the problem is. One glaring issue I see just glancing at it is that you seem to have \ characters around your strings which don't need to be there. Thus the first error you get is saying that it can't figure out why there is a \ between the print command and the string. So to give you an example, you need to change:



into this:



Now I don't like to make a thing about it but there is something rather strange about your program; I wonder if you could enlighten us a little on what it actually is? For example, first off, there is a lot of code there, many lines of which wont compile because of the above mentioned error. Did you translate this from another language?

Also the T&C seem to also be laying down the punishment for breaking them... If that's your T&C, I would suggest that you might need to have a rethink because I'm not sure that that would hold up in a court of law.

Quote: "Print \"By playing/buying this game you accept to these terms and \"
Print \"if broken you will have to pay £10 and all money made \"
Print \"through ilegal selling of the product.\""


It would also be worth fixing the typos in the licence.

As a final note, I should mention that the use of the goto command is generally considered bad because it creates "Spaghetti Code"; that is, code that is pretty unreadable. You might want to consider using functions instead.

If you clarify your question, I'm sure you'll find lots of people here who are willing to help further.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 13th Oct 2011 02:23
I don't know where have you copied this code from, but I suppose that you have copied the entire code from the original
Quote: "Rem * Title : ICED
Rem * Author : DBS-LB
Rem * Date : 1st May 2000
rem ********************************************
rem * ICED *
rem ********************************************
rem * AUTHOR: Lee Bamber DATE: 1st May 2000 *
rem ********************************************"

that come include with old Darkbasi Clasic.

I can't understand why you have code such amount of \ like :

Quote: "load image \"floor.bmp\",1"
That is a wrong sintax .The complete code from the original of Lee Bamber that works perfectly is:






Correct me if I'm wrong

Cheers.

I'm not a grumpy grandpa
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 13th Oct 2011 06:16
Another problem that I see is the usage of goto to break from loops (do - loop) which will cause a "stack overflow".
Ex:
Should be changed to something like:
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Oct 2011 15:44
Quote: "Another problem that I see is the usage of goto to break from loops (do - loop) which will cause a "stack overflow"."

No it won't - neither constructs use the stack in any way.

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 13th Oct 2011 15:47
Really? So are functions the only thing that uses the stack?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Oct 2011 16:01
Gosubs too, plus the commands/functions within plug-ins (both standard and third-party).

DO...LOOP is effectively the same as a label followed by a GOTO, except that it's structured of course.

Flamertor
14
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 13th Oct 2011 18:42
Hi thxs for the responce
please excuse my bad spelling im deslix (I probley spelt that worng too)

The reason i didn't put the problem in is becuase i don't aculy know what it is. Plus there is a part of the "iced" code in the program.
Flamertor
14
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 13th Oct 2011 19:20
did it post
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Oct 2011 12:38
Quote: "The reason i didn't put the problem in is becuase i don't aculy know what it is."


You must have some idea. Otherwise how do you know there's a problem? What are the symptoms? What happens that is different from what you expect? Etc, etc.

Quote: "did it post"


Did what post? Your posts might not appear immediately if you have only just joined the forum - they get checked first. Happens to all of us when we first join.
Flamertor
14
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 14th Oct 2011 12:58
the problem is that it says theres a syntex error and i don't know why.It wont let me run it.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Oct 2011 15:52 Edited at: 14th Oct 2011 16:18
What syntax error do you get?

Have you tried making the corrections other people have suggested?

For example, you probably need to replace each occurrence of \" with just " as Lucas Titidath suggested.

Edit: Oops! Wrong slash.

Edit2: I think you have a missing "loop" statement. Check your do/loops which start on lines 184 and 233 and decide where the "loop"s should be.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 14th Oct 2011 23:25
After removing all the \'s the first time running it pointed out that you're using EXIT as a label which is a no-no... EXIT is used to leave loops so it gets confused when you use it as a label. One rule of thumb to remember... if you type in a label or variable and it's color turns to blue it's a command and you shouldn't use it as a label or variable name.

Line 58-62:


The quick thought is to just have EXIT instead of GOTO EXIT because EXIT leaves the DO/LOOP and would naturally go where you want it to go but if that label is somewhere else just add a 1 to Exit so it's no longer the EXIT command.

Next in line 97 you forgot the parenthesis after the SPACEKEY() command.

Next it got confusing because it kept telling me "Function declaration 'makeraindrop' must be outside any program nests at line 1337." so searching through all the code above the functions for a nesting error resulted in finding on line 1192 you have "NEXT rg" when the FOR/NEXT loop that created it used just "g".

Lines 788-811 aren't good either:


Never, never, never put a label in the middle of a nested IF/ENDIF... you're just asking for weird errors like the ones you've been getting.

Change it to this:


And the final error that doesn't cause it to compile is on line 185 where you have a DO without a LOOP... I'll let you figure out where the LOOP goes... that was the actual nesting error I mentioned above.

Here's what I ended up with:


Flamertor
14
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 15th Oct 2011 17:18
thank you everyone. the problem have been fixed thank you. It works perfectly. thank you so much! i think i improved alot from this. Thanks . Thank you so much!

Login to post a reply

Server time is: 2026-07-11 02:55:18
Your offset time is: 2026-07-11 02:55:18