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 / Save Image/Copy file error

Author
Message
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 21st Dec 2008 04:58
Ok so i was fooling around with file commands and was thinking could you create your own install program so i tested it by loading an image and then in the program ask the directory and name for the file then save it there. well it makes the directory and saves the image if it's in the file with the image in it but if its not then it doesn't give a error it just says its done and when i go to the file it's not there. any help

I'v tried pasting the image and using get image and then save image. i have also tried just loading and then saving it. then i tried also doing copy file command. just like before no actual errors but it doesn't work
Quirkyjim
17
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 21st Dec 2008 15:25
Are you running Vista? (don't ask)

~QJ
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 21st Dec 2008 16:29
Nope Good old XP
steve paul thomas
17
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 22nd Dec 2008 18:58
Code?

I don't Adam and believe it!
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 22nd Dec 2008 19:07
yup here it is

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Dec 2008 19:34 Edited at: 22nd Dec 2008 19:34
shouldn`t
be
?

Peachy, and the Chaos of the Gems

Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 22nd Dec 2008 19:37
whoops sory typo
steve paul thomas
17
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 22nd Dec 2008 20:24
I just started on this, but am going to have to go out. Hopefully someone can help you with this.

I don't Adam and believe it!
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Dec 2008 01:13 Edited at: 23rd Dec 2008 01:20
I'm not sure but after creating the directory, you might have to CD to it or use SET DIRECTORY.



Enjoy your day.
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 23rd Dec 2008 02:26
ok yours works i will adapt mine thanks latch!!!!!
Quirkyjim
17
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 23rd Dec 2008 23:23
And it's a backslash (\) for using directories

~QJ
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 24th Dec 2008 07:00
oh well i have always used Forward ones does it make a difference?


Jw is it possible to copy a file out of a exe on to a computer?
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 25th Dec 2008 14:00
Quote: "Jw is it possible to copy a file out of a exe on to a computer?"

You mean from a final build?
if you wanted to do that just make a standalone exe (not including media) and keep your media with it.
Or is there some media in someone else's game you want to use? In that case I don't think so, I think that's one of the reasons for making a final so that no-one can copy your media.


Goke of the day: [Q]What's a coders' favourite part of an orchestra?
[A]The strings.
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 25th Dec 2008 19:39
no i wasn't going to jack media off of people haha that would be mean and i think slightly illiagle haha.

i was talkinga bout a sort of install. basicly i was wondering if its possible to make a install program with darkbasic?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Jan 2009 19:05
Use a PAK file. You can use the command "write fileblock". with that, you can write anything(even exe`s) into a file. That you then include in the final build, and use "read fileblock" to read your exe out of the file into the current directory (or another directory).

TheComet

Peachy, and the Chaos of the Gems

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 4th Jan 2009 00:49
@Caleb1994

Also, there should be a folder in your DarkBASIC install path Extras>Compression

Inside there is a DLL and some helpful examples of how to compress and store your media. This by itself or in combination with PAK files TheComet was talking about, can allow you to package your distribution in a compact manner (and if you read through the comression dll info and examples, a measure of security).

Enjoy your day.
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 4th Jan 2009 02:01 Edited at: 4th Jan 2009 03:22
Oh sweet what exactly is a pak file? i understand what it does but i was just wondering what it was
[edit]
Just read the help got what a pak file is. i tried making one just for testing and it's not saving. i am not getting any errors it just doesn't save

[/edit]

oh and thanks latch that helps tons. how do i read those files back in though?

Login to post a reply

Server time is: 2026-07-06 10:01:36
Your offset time is: 2026-07-06 10:01:36