Advertisement

LuaBind binding error

Started by December 06, 2011 10:35 PM
0 comments, last by akonnen 13 years ago
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.)
Er, I seem to have solved it. Was missing a comma on the line before. Thank you.

This topic is closed to new replies.

Advertisement