Chiblue Posted September 9, 2010 Share Posted September 9, 2010 I am trying to ensure that my project only contains the files I need for the scene, I have added the script folder, model/entity folder and materials.. My scene is very simple, it's a terrain with a couple player start entity... Thanks all I have but when I run my game, the loadscene returns a bad pointer to the entity.. m_eScene=LoadScene((str)m_cLevelPath.getFullPath().c_str()); (cLevelPath is the leve path name, i built a class to provide information on file names)... m_cLevelPath.getFullPath() contains "abstract::t5est01.sbx" which is what I expect... I even removed abstractpath and qualified the path entirely.. but I still have a problem.. how do I trouble shoot this? some trapable error would help? If I remove the script folder it fails.. so it seems to be trying the load... by the way I am using 2.40 Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Mumbles Posted September 9, 2010 Share Posted September 9, 2010 For some reason. I find that using .c_str() doesn't seem to work even though it should. std::string LevelName = "BlahBlahBlah.sbx"; char *OldStyleString = (char*) malloc(LevelName.size() + 1); for(int x = 0; x < LevelName.size; x++) OldStyleString[x] = LevelName[x]; OldStyleString[LevelName.size()] = '\0'; TEntity MyScene = LoadScene(OldStyleString); free(OldStyleString); But since you say it seems to be trying to load, perhaps copy and paste this troublesome bit into a console project and run that. As you might know, for console projects, the log is printed to the console window in real time. So if you run that without debugging, the console window will stay open and you can read which object gave when trying to load Quote LE Version: 2.50 (Eventually) Link to comment Share on other sites More sharing options...
Chiblue Posted September 9, 2010 Author Share Posted September 9, 2010 I found the problem it was failing becuase I have not created a camera.. I created a camera from the framework.getmain and now it works.. Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.