Can we call the fuction within the fuction itself?

coolman

Active Member
I see in EQ2Bot.iss

function MovetoWP(lnavregionref destination)

within the fuction,it calls

call MovetoWP ${LNavRegionGroup[Camp].NearestRegion[${Me.X},${Me.Z},${Me.Y}].ID}

Is that right?
 

steeveebr

Active Member
Yes

I haven't looked at the exact syntax within that function, but yes you can recall the current function from within itself.

Skip the rest if you only want a yes/no explanation....

It's called a recursive function and is part of what happens naturally in life. Basically it will recall itself until a certain condition is met. This is like a loop but not everything that happens recursively in a program is easily converted to loop iterations.

Good luck.
 
Top Bottom