Page 1 of 1

[SOLVED] Need help in my function...

Posted: Sun Oct 30, 2016 10:13 am
by kutalmismete

Code: Select all

function setRaidPos(num)
	for i = 1, 36 do 
		name = GetPartyMemberName(i)
		if name == player.Name then
			RoMScript("MoveRaidMember(i, num)")
			break;
		end
	end
end
I can't understand why it doesn't work. Also when I trying to check that on waypoint's onLoad phase, it saying (number expected, got nil) or Error sending command to IGF. and kinda errors etc. How can I use variables on MoveRaidMember ?

EDIT: Sigh... Like everytime I found syntax via other function lua files.

Code: Select all

function setRaidPos(num)
	for i = 1, 36 do 
		name = RoMScript("UnitName('raid"..i.."')")
		if name == player.Name then
			RoMScript("MoveRaidMember('"..i.."'	, '"..num.."')")
			break;
		end
	end
end
Now It is working.