Uberman Posted March 17, 2012 Share Posted March 17, 2012 I have the following code: [...] // Set graphics mode LEO::Engine engine(AppTitle,ScreenWidth,ScreenHeight); if( !engine.IsValid() ) { ErrOut( "Failed to set graphics mode."); return 1; } engine.AddAbstractPath( MediaDir ); // Create framework object and set it to a global object so other scripts can access it LEO::Framework fw; if(fw == NULL) { ErrOut("Failed to initialize engine."); return 1; } // Set Lua framework object engine.SetObject( "fw", fw ); // Set Lua framework variable LEO::Lua lua; lua.PushObject( fw ); lua.SetGlobal( "fw" ); lua.Pop( 1 ); LEO::Model skybox("abstract::environment_atmosphere.gmf"); [...] Leadwerks is installed to "D:\Leadwerks\SDK", which is what the "MediaDir" value contains. I'm trying to add a skybox to the test, and when it hits the line that loads the one provided with the SDK, I get an error message that says "can't open scripts/class". The console has the following text regarding this problem: Loading model "d:/leadwerks/sdk/models/entities/environment/atmosphere/environment_atmosphere.gmf"...Loading mesh "d:/leadwerks/sdk/models/entities/environment/atmosphere/environment_atmosphere.gmf"... Loading material "d:/leadwerks/sdk/materials/effects/invisible.mat"... Loading script "d:/leadwerks/sdk/models/entities/environment/atmosphere/environment_atmosphere.lua"... Lua error: [string "d:/leadwerks/sdk/models/entities/environment/atmosphere/environment_atmosphere.lua"]:3: attempt to call global 'CreateClass' (a nil value) So...what am I doing wrong now? Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 17, 2012 Share Posted March 17, 2012 Copy the scripts folder from the SDK to your project folder. That should solve the problem. Quote Link to comment Share on other sites More sharing options...
Uberman Posted March 17, 2012 Author Share Posted March 17, 2012 Created a symlink to it in the project folder, and the skybox now loads. Thanks, Aggror. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 17, 2012 Share Posted March 17, 2012 Thank you 2. I never heard about a symlink before. It is quite useful! Quote 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.