- Timestamp:
- Jan 18, 2007, 3:57:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/heathaze/src/lib/script_engine/script.cc
r10292 r10293 93 93 bool Script::loadFile(const std::string& filename) 94 94 { 95 96 int seperation = filename.find_first_of('/'); 97 std::string directory = filename.substr( seperation, 0 ); 98 std::string file = filename.substr( seperation ); 99 100 printf("Directory is %s \n", directory.c_str()); 101 printf("File is %s \n", file.c_str()); 95 96 std::string directory = ""; 97 std::string file = filename; 98 99 unsigned int seperation = filename.find_first_of('/'); 100 if (seperation != std::string::npos) 101 { 102 directory = filename.substr( 0, seperation+1 ); 103 file = filename.substr( seperation+1 ); 104 } 102 105 103 106 std::string filedest(Resources::ResourceManager::getInstance()->mainGlobalPath().name()); 104 filedest += " /scripts/" + directory + filename;107 filedest += "scripts/" + directory + file; 105 108 106 109 this->addThisScript(); … … 137 140 } 138 141 142 printf("SCRIPT : ERROR: while loading file %s \n",filename.c_str()); 139 143 return false; 140 144 }
Note: See TracChangeset
for help on using the changeset viewer.