You have to assign an object to take the gold in order to make it work. I'm not sure why, it's just one of those oddities with nwscript.
int nGold = GetGold(oTarget);
AssignCommand (oTarget, TakeGoldFromCreature(nGold, oTarget, TRUE));
Oddly enough, you have have the character take the gold from themselves, and it'll still work as long as you're destroying it.
edit: switched it to oTarget since that's what you used.
Modifié par Failed.Bard, 18 juillet 2011 - 02:36 .