Jump to content
drakth

Question About latest changes

Recommended Posts

Hello everyone!

 

I read about the summer games tounament thingy and decided to try do a small game.

 

So, i started leadwerks and made a new project.

 

From what i read there is no difference now between a C++ or LUA project so, i went to Visual Studio and opened the solution.

 

I saw there are quite several changes from the last time i used it, so i added some code i had from a previous project for a FPS.

 

It compiled ok, but all i see is a black screen.

 

So i went looking in detail at App.cpp

 

Noticed stuff that wasnt there before. From debugging i see the code seems to be using Lua instead of C++???

 

Yes, i have the standard edition.

 

The code i mention is the following:

 

std::string scriptpath = "Scripts/Main.lua";
if (FileSystem::GetFileType("Scripts/App.Lua") == 1) scriptpath = "Scripts/App.Lua";
//Invoke the start script
if (!Interpreter::ExecuteFile(scriptpath))
{
 System::Print("Error: Failed to execute script \"" + scriptpath + "\".");
 return false;
}

 

My code is after this part so it only gets executed when exitting the game (?).

 

Should i place the code somewhere else?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...