It can't print pPlayer because that's not a scalar value.. Anyways there's no reason to print that. Just print 'event' and 'emoteid' and see what they are when you do the emote
It can't print pPlayer because that's not a scalar value.. Anyways there's no reason to print that. Just print 'event' and 'emoteid' and see what they are when you do the emote
It should do, it should just print it saying what type of data it is and the GUID (so it will say in core: USERDATA 205 or whatever), at least that has always worked for me in the past when debugging. I still haven't got round to debugging it since I'm actually packing to go on holiday, but I will soon.
EDIT:
Ok, it turns out you can't print the variables in that syntex as TheSpidey said, instead you have to print them directly:
The results from that were as shows:Code:print(pPlayer)
So that was a success, now I changed the script to the following:
And the results are as follows:Code:function teszt_OnEmote(event, pPlayer, pUnit, emoteId) if emoteId == 4 then print("EmoteID 4 returned successfully by player: "..pPlayer:GetName().."!") end end RegisterServerHook(8, "teszt_OnEmote")
So as far as I am aware, it should work fine.
Last edited by stoneharry; 07-10-2010 at 10:35 AM.