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.

Newcomers DBPro Corner / 2Q's: 1.Cut & Paste; file in use. 2.tips for attached media?

Author
Message
Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 29th Jul 2008 08:53
i finally figured out arrays, and things have been going great. made more progress in 1 day then i have the last 4.

i'v hit 2 snags, as listed in the subject.

1:
I tried to cut a array.arr file out of TEMP folder and paste it in to a folder on my desktop, windows told me i can't because the file was in use by another program. but there was no programs running on the start bar, just TEMP folder and the desktop folder.

zonealarm, AVG-free, and Peer Guardian 2 are the only things besides my little speaker icon for sound controls.

i'm alittle confused, and very angry (i hate not being in control of my own files on my own computer).

was wondering if any one knew anything on this, and if any one knew the process name for DBP under task manager.

2.
i am looking for tips (windows or coding) for attached media (above mentioned .Arr files).

the reason for both of these questions is that i want to send a friend of mine the .exe for the program but can't seem to get it to compile the .exe with the media attached, dispite checking the 'EXE with attached media' under settings. When it get's to the point it needs to load a array it kicks out a error and closes.

i'm tested it by putting the newest attempt on my mp3/flash player/drive and running on another computer. not sure how safe that method is for real computer data.

thanks for any idea and tips.

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 29th Jul 2008 15:25
if you have done attached media right the file size will be a lot bigger than when you did not.

what other it doing at a lost.

Dark Physics makes any hot drink go cold.
John Y
Synergy Editor Developer
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 29th Jul 2008 22:48
Adding media to exe's has a few limitations. Make sure that the media files are 'under' the project directory e.g. if your project is in C:\MyGame\ then you should put your media in C:\MyGame\Media\

Synergy Editor - Available for free HERE!
Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 30th Jul 2008 02:42 Edited at: 30th Jul 2008 03:48
thank you both, though it does pose another question, how do i set up the program to look in the folder with the media?

i know i can do it for this computer by putting the entire path in the load array command, but i don't know where my friend will place the .exe when he gets it..

i'm thinking thats the 'get dir' command (or something along those lines). but i'v never used that before so i should go looking for tut's. gonna try some things with it, see if i can figure it out.

Thanks again HowDo and John Y

EDIT: Get Dir$(), but can't get it to work

tried Load Array Get Dir$()+"folder/file", Var$=Get Dir$() : Load Array Var$+"folder/file"

tried Set Dir command with some methods. always get 'file does not exist'.

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 30th Jul 2008 13:00
Anti Human , should be if you get it to compile then all the images are there, just move the completed icon and code to your friends computer and it should run.

If you are asking how do I get media from a folder called media to load when you compile you this.

load image "folder_name\file.bmp",xx,1

\ = go back up the tree to a folder

so if you have a project folder named MyGreatestGameOfAllTime
and in side that folder you have MyObjects and MyImages then the loading lines will look like this.

load object "MyObjects\theobject.x",1
load image "MyImage\theImage.bmp",1,1

hope that makes it clear on how to use.

Dark Physics makes any hot drink go cold.
Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 30th Jul 2008 19:51 Edited at: 30th Jul 2008 20:31
....hmm. just moved the whole thing from desktop to E drive. nothing coding or dark basic on E. it just ran the code for race selection. moved just the .exe to C drive (again, nothing DB or coded) and it didn't run, same RTE.

gonna toy with a bit, as i'm obviously missing something. but doesn any one know if theres a problem with having it on folderexe or folderfolder.arr on desktop?)

do appreciate the help, it is getting me some where.

EDIT: wouldn't waste time replying at the moment, i'v found some inconsistanties (spell check). saving 'weapons' but loading "weapons.Arr', things like that. working them out now.

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Jul 2008 00:29
You are missing the backslash/slash character between the folder name and the file name.

Also, if you aren't using a project file and are just typing code into the editor, the starting folder will be the temp folder in the DBPro installation folder.

Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 31st Jul 2008 00:30 Edited at: 31st Jul 2008 00:38
got all the mistakes worked out that i can find. still can't get this...i don't know.

@ IamM i had the '\' in there, don't know what happened to them.

also i'v been copying and pasting the files in to the folders from TEMP. i have to copy and paste because every time i try to cut or delete it tells me the file is in use, even if i closed DarkBASIC and any .exes, and after even a reboot.

would that cause dbp to return a RTE-105? if the file was being used by another program?

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 31st Jul 2008 00:36
When I find that I can't see if I have written the file name write I copy the file name from the file and paste that in to the speech marks "", however I don't think you are having that problem.

just checking, Have you used set Dir anywhere in your code?

Dark Physics makes any hot drink go cold.
Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 31st Jul 2008 01:53
did a search in the source for Set Dir, no hits.
checked the path names again, too.

i thought checking the 'include all media' exe option was suppose to add all the media to the exe.

from a book that has proved less then reliable, it was for classic, not pro (only has some pro content); but the author wrote that he liked darkbasic because it wrapped every thing in to one exe, that way you would only have one file to send.
i can't imagin they would take something like that out for pro.

i'm about to just give up and start the whole project over from scratch. at least then i test things as i make them instead of modifying code to run with arrays.

thanks for the effort though. imma find a incinerator program for the files that are always in use.

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow
Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 31st Jul 2008 02:18 Edited at: 31st Jul 2008 07:10
check this out, i'm on my roomies pc right now. i unhook the network cable and close peer guardian and zonealarm, and i can delete the files. i can also run the program with no error up to the point of creating the enemy, which i hadn't gotten to trouble shoot yet as i couldn't get past the weapon selection.

so imma do some cleaning up on my drives, and pound out some more code to get enemy creation to work, and then i'l be back on the forums after i hook back in the network and reboot to get my firewall and IP blocker back up.

EDIT: i'm back, files are deleted, and program is running. thank you every one! there are some major balancing issues with it but i'm attaching the game. don't play a Dwarf, you'll never land a hit.

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-27 18:23:01
Your offset time is: 2024-09-27 18:23:01