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.
pakata
Posts: 18 Joined: Tue Sep 23, 2008 11:51 pm
Location: korea rep of
Post
by pakata » Mon Nov 03, 2008 9:25 am
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 » Mon Nov 03, 2008 9:31 am
and what's your problem?
JP
Posts: 4526 Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:
Post
by JP » Mon Nov 03, 2008 9:45 am
I'm guessing it doesn't change for some reason, though stating that would have been nice
rogerborg
Admin
Posts: 3590 Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:
Post
by rogerborg » Mon Nov 03, 2008 12:10 pm
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.
Acki
Posts: 3496 Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:
Post
by Acki » Mon Nov 03, 2008 2:17 pm
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...
pakata
Posts: 18 Joined: Tue Sep 23, 2008 11:51 pm
Location: korea rep of
Post
by pakata » Mon Nov 03, 2008 11:08 pm
my mistake...
in workingdirectory..
i had no other sub directories...
so make directories
now working well .....
ha ha ha ;;;;
sorry..... ^^;;;;;;;