Hello i'm trying to get this code to work
extern "C"
{
#include <lua.h>
#include "lualib.h"
#include "lauxlib.h"
}
#include "glew.h"
#define GLEW_STATIC
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include <stdlib.h>
#include <iostream>
#include <fstream>
////////////////////////
////////////////////////
test.h
void Test(void)
{
int status;
**//The Lua Interpreter**
lua_State *L = lua_open();
**//Open Lua Libarys**
luaL_openlibs(L);
**//Run Lua Script**
status = luaL_loadfile(L,"Test.lua");
printf( "actually getting to this point!");
getchar();
//Close Lua
lua_close(L);
}
this is named test.lua this is my lua file
print"Whats your name?"
function sleep(n)
end
this doesn't work :(
lual_dofile(L,"Test.lua");
the hole program compiles but then doesn't execute the script or show any visual feedback of the lua script running has anyone encountered this problem before? and has any knowledge of why ?**