Jump to content

"can't load scripts/class"


Uberman
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...