changeworkindirectory problem...

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
pakata
Posts: 18
Joined: Tue Sep 23, 2008 11:51 pm
Location: korea rep of

changeworkindirectory problem...

Post by pakata »

Code: Select all

core::stringc aaa = device->getFileSystem()->getWorkingDirectory();
printf("%s \n",aaa.c_str());
aaa+="\\media\\tree";

device->getFileSystem()->setWorkingDirectory(aaa.c_str());

aaa = device->getFileSystem()->getWorkingDirectory();
printf("%s \n",aaa.c_str());
um...
whats wrong?
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

and what's your problem?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I'm guessing it doesn't change for some reason, though stating that would have been nice :lol:
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: changeworkindirectory problem...

Post by rogerborg »

pakata wrote:device->getFileSystem()->setWorkingDirectory(aaa.c_str());

um...
whats wrong?
First, the method is changeWorkingDirectoryTo(), not setWorkingDirectory(), at least it has been since 1.4.2.

Second, changeWorkingDirectoryTo() returns a bool result. If you pass it an invalid path name, then it will fail, and it will tell you that it has failed.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

works fine for me with Irrlicht v1.4.2, after changing to changeWorkingDirectoryTo() of course... ;)
also the path must exist, otherwise you'll never be able to change to this directory, of course... :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
pakata
Posts: 18
Joined: Tue Sep 23, 2008 11:51 pm
Location: korea rep of

oops;;;

Post by pakata »

my mistake...

in workingdirectory..

i had no other sub directories...

so make directories

now working well .....

ha ha ha ;;;;
sorry..... ^^;;;;;;;
Post Reply