Jump to content

Sending number (c++ to lua (quest))


Recommended Posts

I wrote a code which should send the number to lua (quest), but something is wrong.

 

 

This code isn't sending number to lua, why?

 

Plik questlua_pc.cpp:

...
int pc_my_func(lua_State* L)
{
...
			lua_pushnumber(L, 0);
			return 0;
...
}
...

and quest test.quest:

quest test begin
	state start begin
		when blacksmith.chat."test" begin
			say("test")
			local var = pc.my_func()
                        say(var)
		end
	end
end
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.