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 Professional Discussion / My Game only plays on the host machine

Author
Message
Artformer
15
Years of Service
User Offline
Joined: 23rd Aug 2010
Location: Scotland
Posted: 24th Aug 2010 13:18
A game I developed in DB Pro only plays on the machine it was developed on. It always crashes on other PCs or laptops, of similar spec or be3tter at what seems to be the same spot-
LOAD ARRAY MapFile$,MAP1(0) , despite the fact that the relevant file is present and path information has been given.
The array is a 10,000 element for maps.

The program works on my laptop, but fails on almost the exact same laptop as mine, and on every other pc I've tried it on. Its not a compilation error, or any other DB Pro error, but instead, a Windows "program has stopped working". Stepping through the program, it fails at this array load. Any ideas?
Thanks
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 25th Aug 2010 12:06 Edited at: 25th Aug 2010 12:07
Do they have the same version of DirectX that you do?
If windows Vista / 7, do they have access to the folder which contains the program + data?

Also, You dont need to do this:

this will suffice:

You don't need the 'As String' because the $ tells the compiler your variable is a string, and you don't need the '= ""' as DBP initializes all variables to 0, or "" anyway.


This command is used to reset data when you use the DATA command. Which you don't use in this demo. This code is useless in this example.


This is pointless. You don't setup where a$ is getting it's data from. Since you don't use any DATA statements, A$ will always be empty. This code is useless in this example.

You really need to either change the way the 'Read a$' works, by including a bunch of data commands in your code, or change it to read from a file.

My signature is NOT a moderator plaything! Stop changing it!
Artformer
15
Years of Service
User Offline
Joined: 23rd Aug 2010
Location: Scotland
Posted: 30th Sep 2010 09:19
long time replying.. appologies. The RESTORE command does exist.. noit sure why it wasn't in the snippet. I have found out why my code didn't run on other machines, and it was due to the video card settings for each machine. I have fixed it so my code runs on all machines now. I think my biggest problem was just getting back into coding again after a 30 year lay off and getting familiar with current compilers etc! lol. In those days, it was 8 bit machine code and assembler. DB Pro is a lot of fun, but the compiler seems a bit weak.. you have to watch it. Seems ok though
if I don't do things like trying to compile with an error message disquised by another window, not clicked!

Login to post a reply

Server time is: 2026-07-24 23:12:47
Your offset time is: 2026-07-24 23:12:47