lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

In the example I gave, yes, your test would work. But bot:setAngleToOtherBot(bot2) would fail that test.

On 2/16/2010 4:11 PM, Wesley Smith wrote:
Is there a way from C++ to figure out if a function was called using "." as
opposed to ":"?
What you should be asking instead is how to tell if the object is the
first argument in C++ since bot.setAngle(bot, angle) is equivalent to
bot:setAngle(angle).  If bot is a userdata that you grab the pointer
to, then the check should be trivial.