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 / Final EXE's don't like my paint Program X(

Author
Message
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 7th Jan 2009 07:16
Ok so i have a paint program i'v been working on and it works fine in the editor(and it had worked in the exe) but all the suddun when i compile to final exe and try to save it gives me a error "Runtime error: ERROR 136" and i was just going through all my versions and stuff and all the others had worked but i compiled that one and now none of them will save they all give the same error and they all work in the compiler heres the hole code



And heres the specific mouseclick code:




I know for a fact that it's not getting to the function call(if it did then the save box would pop up) so i figure it's in the actual mouseclick() code but i can't find anything that would crash it in the exe but not the editor. btw yes i know a couple of the functions are pretty much duplicated but i havn't taken them out yet (random but ussually people give advice on coding and i already know that there useless haha)

any ideas (i mean any! lol) would be very much appreshiated (wow that was so wrong lol)
Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 7th Jan 2009 13:19
Interesing problem - I haven't heard of a program that runs in the editor yet crashes as an exe. I'm wondering if you're looking for a file which doesn't exist. Are you quite sure your Info/data.txt file exists in the folder where the exe is? I can't quite follow what goes on with it at startup, it seems to keep being deleted and recreated.

Alternatively, maybe the "#include" command isn't working - try copying the contents over to your code project, so you're only compiling a single .dba file.

Perhaps more useful, try placing the attached setup.ini file with your compiled exe. I've adjusted it so that advanced error reporting is used - when the standalone exe crashes, it will return (amongs other things) the line number of the source code where the error occurred. Bear in mind that the returned line number treats all user defined functions as coming first in the dba file and then moves on to your main code (not sure where functions from include files appear).

If you trace the error to a "Sync" command, then look for an image or sprite that should exist but doesn't - You'll know an image has gone missing. If you trace it to a "Read data from file" type command, you'll know the file is missing.

Good luck!

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 7th Jan 2009 18:41
I am the dumbest person i know lol. it was that txt file! I was putting all my Versions in one file and forgot to put the Saved images and Data Files In that folder (saved images is where it saves if you just hit control S). the reason that txt file is getting deleted and remade is because it wouldn't work for some reason with save array so i had to load everything in delete it then change the stuff i needed make it again and save the stuff lol. seriusly i feel extremely stupid! i had looked at the code for like an hour and didn't see it.


thanks for that INI though That sounds usefull
Ashingda 27
18
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 7th Jan 2009 18:52 Edited at: 7th Jan 2009 18:54
I couldn't find anything in the mouseclick code but seems there might be a problem here:



In that gosub Check, you're going to Check: which is just a bit above right? If so It's better to use a goto than a gosub in this case so you don't run into an error with no return after gosub.

Better yet just run a For... Next or Repeat...Until.
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 8th Jan 2009 03:24
ya i'll prbly use goto but if you read my last post i already fixed it
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Jan 2009 03:54
Just an added note: when making a Final exe as opposed to just an exe, everything in the folder and any subfolders where the main program is located gets put into the final... EVERYTHING. So if you have test versions of the code, or extra exes or media you were testing out in the same folder, it will all get put in the exe and besides bloating it to a ridiculous size, it can also cause it not to function.

Enjoy your day.
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 9th Jan 2009 02:07
oh I didn't know that thanks latch

Login to post a reply

Server time is: 2026-07-05 15:24:12
Your offset time is: 2026-07-05 15:24:12