11 Apr
2011
11 Apr
'11
7:07 p.m.
AMDG On 04/11/2011 11:19 AM, Littlefield, Tyler wrote:
Hello: Here is what I'm going for; maybe this will explain I have the following code in my project: AddOlc("name", "Please enter the name of the object", STRING, boost::bind(OlcString, _1, _2, _3, boost::bind(&Entity::GetName, this), boost::bind(&Entity::SetName, this, _1))); OlcString: void OlcString(Entity* ed, Player* mob, const Variant* input, boost::function<std::string ()> get, boost::function<void (const std::string&)> set) { if (input->Typeof() != VAR_STR) { mob->Message(MSG_ERROR, "Invalid input."); return; }
set(input->GetStr()); }
Oh. If you're using nested binds like this, you need to use protect. In Christ, Steven Watanabe