Jump to content
  • Advertisement
Sign in to follow this  
akonnen

LuaBind binding error

This topic is 2561 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

While compiling my game engine, I came across a small error that seems to have me stumped. I could find no references to this error on google. The error seems to reside in my class bindings, but I'm unsure what the error means or where the problem would be.

The error:
main.cpp:48:3: error: expected â]â before âluabindâ
main.cpp:48:3: error: expected â;â before âluabindâ


The code (Line 48 is the bindings for Connection):

luabind::module(L) [
luabind::class_<Account>("Account")
.def("engineType", &Account::engineType)
.def_readonly("name", &Account::getName)
.property("essence", &Account::getEssence, &Account::setEssence)
.def("addCharacter", &Account::addCharacter)
.def("removeCharacter", &Account::removeCharacter)
.def("chckCharacter", &Account::chckCharacter)
.def("countCharacters", &Account::countCharacters)
.def("clearCharacters", &Account::clearCharacters)
.def("addDatum", (void(Account::*)(std::string, std::string, int)) &Account::addDatum)
.def("addDatum", (void(Account::*)(std::string, std::string)) &Account::addDatum)
.def("removeDatum", &Account::removeDatum)
.def("hasDatum", &Account::hasDatum)
.def("getDatum", &Account::getDatum)
.def("countData", &Account::countData)
.def("getDatumInfo", &Account::getDatumInfo)
.def("getDatumDur", &Account::getDatumDur)
.def("setDatumInfo", &Account::setDatumInfo)
.def("setDatumDur", &Account::setDatumDur)
.def("changePassword", &Account::changePassword)
.def("chckPassword", &Account::chckPassword)
.def_readwrite("isnew", &Account::isnew)
luabind::class_<Connection>("Connection")
.def("engineType", &Connection::engineType)
.property("buffer", &Connection::getBuffer, &Connection::setBuffer)
.def("write", &Connection::write)
.def("send", &Connection::send)
.def("close", &Connection::close)
.def("getAccount", &Connection::getAccount)
.def("initAccount", &Connection::initAccount)
.def("clearAccount", &Connection::clearAccount)
.def_readwrite("state", &Connection::state)
luabind::class_<Datum>("Datum")
.def("engineType", &Datum::engineType)
.def(luabind::constructor<char*>())
.def(luabind::constructor<char*, char*>())
.def(luabind::constructor<char*, char*, int>())
.property("name", &Datum::getName, &Datum::setName)
.property("info", &Datum::getInfo, &Datum::setInfo)
.property("duration", &Datum::getDuration, &Datum::setDuration)
];


Any help on discerning what the error is or why it might be happening would be appreciated. Thank you ahead of time. (Also, I apologize if this is in the wrong section.)

Share this post


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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!