It is currently Wed Oct 15, 2008 4:26 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: _realm_iter
PostPosted: Sun Jan 07, 2007 11:46 pm 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 561
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 3:00 am 
Offline

Joined: Sun Feb 05, 2006 2:00 am
Posts: 91
Location: Denmark
http://forums.polserver.com/viewtopic.p ... =realmiter

:)

_________________
When was the last time, you did something for the first time?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 3:36 am 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 561
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..... :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 5:27 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
iterators are great things.

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 8:27 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 422
Location: San Diego, California
_(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.

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 8:51 am 
Offline

Joined: Sun Feb 05, 2006 2:00 am
Posts: 91
Location: Denmark
Great indeed, but the documentations on this topic is inadequate.

_________________
When was the last time, you did something for the first time?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 8:58 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 422
Location: San Diego, California
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.

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 9:12 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
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 :)

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 5:13 pm 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 561
Austin,
does the online 096 racalac escript guide need fixing?

Quote:
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl