FredMastro, on 10 March 2014 - 02:25 PM, said:
I found it works like this:
print("I am "..tostring(displacement).." away from home!!!")
Cranium has already updated the wiki to an adaption of your code, but to just expand on what the problem actually was. It was because they used
displacement.tostring instead of
displacement:tostring since the Vector API was implemented correctly however it does implement the
__tostring metamethod, meaning the 3 ways you can invoke it are as follows:
print("I am ", displacement.tostring(displacement), " away from home!!!") --# you must pass the reference to itself when using dot notation
print("I am ", displacement:tostring(), " away from home!!!") --# colon syntax makes the above easier as it automatically passes the reference
print("I am ", tostring(displacement), " away from home!!!")
basically what I'm saying here is with the
print function you can pass it multiple arguments and they'll be concatenated, you don't need to concat them to print.