Original Post
Hi: there are some questions when I browse the web of lua.the question are: 1.when we call the lua_register(eg: lua_register( luaVM, "addNPC", l_addNPC ); and the file of lua is bleow),its can automaticlly be registered and called by each addNPC(this sample will be called 3 times) 2.when the informations of lua's file are push into stack thans a lot! int l_addNPC( lua_State* luaVM) { theNPCManager->AddNPC( lua_tostring(luaVM, -1) ); lua_pushnumber( luaVM, 0 ); return 1; } addNPC("Joe"); addNPC("Sue"); addNPC("KillBot2000");