lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello Everybody 

I have looked around and I am not able to find any information regarding my 
problem. Anybody know what I am doing wrong or were i can find some c and 
lua tutorials.

Thanks Ben

error: attempt to call global `print' (a nil value)

test.lua
-- Hello World

print("Hello World")

test.c
#include <lua.h>

int main() {
        int status;
        lua_State *L;
        L = lua_open(1000);
        status = lua_dofile(L,"test.lua");
        printf("Status: %i",status);
        lua_close(L);
}