_realm_iter

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 097.
Note: Core 097 is no longer officially supported.

Moderator: POL Developer

Post Reply
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

_realm_iter

Post by OldnGrey »

Hi,
What is _realm_iter
I see it in the distro with moongates and the decay system, but don't see it defined anywhere.

Thanks in advance
Repsak
Master Poster
Posts: 91
Joined: Sun Feb 05, 2006 2:00 am

Post by Repsak »

User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Well, I'm amazed. It really goes against the grain using something I can't see declared.... Thanks Repsak.
Maybe I will try the distro decay system now..... :)
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

iterators are great things.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

_(var)_iter is a variable you get inside a foreach loop that tells you where you are in it.

foreach tom in (array)

_tom_iter would give you a number and tom would be the value of that index

foreach entry in (dictionary)

_entry_iter would give you the key name you're using and entry would be the value.
Repsak
Master Poster
Posts: 91
Joined: Sun Feb 05, 2006 2:00 am

Post by Repsak »

Great indeed, but the documentations on this topic is inadequate.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Its existed inside of POL for a very, very long time.
It was changed slightly in 095 and was documented.
I think its also noted in an updated version of Racalac's script guide.

Its been discussed on the POL forums numerous times.
*Its been used in distro scripts for a while.



* Most learn from looking at other scripts than any other resource.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

Forums is a good place for information, that's why I read most all posts, not just the ones that look interesting, or pertain to problems of my own :)
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Austin,
does the online 096 racalac escript guide need fixing?
var a := array{"A", 1000};
foreach i in ( a )
Print(_value_iter);
Print(value);
endforeach

_var_iter seems so useful..... I must invent a reason to use it.
Post Reply