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.

AppGameKit Classic Chat / problem with a teir 2 function

Author
Message
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 2nd Jun 2012 04:12
agk::SetCurrentDir("user/user");

when i get the current dir it says its pointing there but i can read data from it example:

agk::CreateSprite(agk::LoadImage("sprite.jpg"));
this creates a checkered image.

does not read from the parent dir or the dir that is currently being pointed at which is user/user. To make sure that it was not pointing to the current directory I checked for that.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 2nd Jun 2012 04:21
Try agk::SetFolder(), SetCurrentDir has been deprecated.

3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 2nd Jun 2012 04:31 Edited at: 2nd Jun 2012 05:06
same thing happened with that command I am confused. I wonder if it is because I am using c++ 2008 and a 32 bit computer. trying it on another computer. I tried it on another computer same thing on it also.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jun 2012 05:46
This may be a dumb question, but what directory is "sprite.jpg" in?

Cheers,
Ancient Lady
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 2nd Jun 2012 07:09 Edited at: 2nd Jun 2012 07:14
user/user directory and in user/ and in the media folder both places. would it have to do that all folders need premission from the administrater. this is the only other thing I can think of. because if those folders can't be accessed then that might do it. For some reason my folders on both computers are read only.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jun 2012 19:21
Read only should not cause a problem finding the image files.

But it would for trying to create a data/text/other file.

Any chance at seeing some of the code? That might help.

And what version of AppGameKit are you using?

If all your images are still in the media directory, try this:
agk::CreateSprite(agk::LoadImage("/media/sprite.jpg"));

I'm fairly certain that specifying a directory starting with '/' forces it relative to the game executable.

Sorry this took so long to respond, I went to bed just after my last post and was actually able to sleep in without interruption this morning.

Cheers,
Ancient Lady
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 2nd Jun 2012 19:44 Edited at: 2nd Jun 2012 19:52
wow ancient lady that did the job. adding a '/' in front of media works. agk::CreateSprite(agk::LoadImage("/media/sprite.jpg")); works that is so confussing. why you have to do this. This is such a wierd format that agk uses never seen it before. Oh never mind this goes off the root directory of media I had the same sprite in both folders.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jun 2012 21:27
I'm glad to be of help.

I tried variants of the SetCurrentDir and SetFolder and some strange results.

I need to do a couple of tests and post those results.

Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-11-23 14:21:23
Your offset time is: 2024-11-23 14:21:23