scrypt Posted December 15, 2011 Share Posted December 15, 2011 I replaced SetAbstractPath with AddAbstractPath and got an access violation. Thanx for any help. Quote Link to comment Share on other sites More sharing options...
Roland Posted December 15, 2011 Share Posted December 15, 2011 There is no SetAbstractPath in LEO. You should use LEO::Engine::AddAbstractPath (which internally calls RegisterAbstractPath) // ==================================================================== // This file was generated by LEBuilder // http://leadwerks.com/werkspace // ==================================================================== #include "stdafx.h" #include "leo.h" #include <string> #include <iostream> using namespace std; using namespace LEO; const int ScreenWidth = 800; const int ScreenHeight = 600; const char* MediaDir = "./cells"; const char* AppTitle = "cells"; void ErrOut( const string& message ) { cerr << message << endl; } // -------------------------------------------- int main( int argc, char* argv[] ) { // Set graphics mode Engine engine(AppTitle,ScreenWidth,ScreenHeight); if( !engine.IsValid() ) { ErrOut( "Failed to set graphics mode."); return 1; } engine.AddAbstractPath( MediaDir ); // <==================== HERE ===================== // Create framework object and set it to a global object so other scripts can access it Framework fw; if( NULL == fw ) { ErrOut( "Failed to initialize engine." ); return 1; } // Set Lua framework object engine.SetObject( "fw", fw ); // Set Lua framework variable Lua lua; lua.PushObject( fw ); lua.SetGlobal( "fw" ); lua.Pop( 1 ); ... ... ... ... ... Quote Roland Strålberg Website: https://rstralberg.com 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.