Jump to content
  • Advertisement
Sign in to follow this  

LuaPlus question

This topic is 4633 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have written this code:
#include <stdlib.h>
#include <iostream>
#include <LuaPlus/LuaPlus.h>

using namespace LuaPlus;
using std::cout;
using std::endl;
int main(int argc, char *argv[])
    LuaStateOwner owner;
    LuaFunction<int> fn=owner->GetGlobal("fn");
    return 0;

and it gives me this error: 14 C:\Dev-Cpp\luaplustestmain.cpp conversion from `LuaPlus::LuaObject' to non-scalar type `LuaPlus::LuaFunction<int>' requested. How do I fix this? I know that I could just do something like owner->DoString("fn()"); and just get the return value that way, but is there any differences from calling it from DoString or using LuaFunction<>? Also, are there function pointers in lua? [Edited by - supercoder74 on November 12, 2005 6:26:16 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!