Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-26-2003, 11:21 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
aindexof()

==================================
- aindexof(value,array)
calculates the positon of the first occurance
of value in the given array
==================================

I didnt get it,could someone explain me better?
Thanks.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #2  
Old 05-26-2003, 11:24 PM
Jeff Jeff is offline
Registered User
Join Date: Oct 2002
Location: Nebraska, USA
Posts: 707
Jeff is on a distinguished road
For array={8,0,2,11}:

aindexof(11,array)=3 and aindexof(8,array)=0
__________________
Jeff, the Archduke of Dustari
Member of the LAT on Graal The Adventure
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GO d+ s++:+ !a C++ UL+(UL+++)@ P+ L+(++)>+++ E---- W++@ N- !o ?K w(w--) !O !M@ !V PS- PE+ Y PGP t+ 5 X R tv(tv+) b++(b+)>b++++ DI(DI+) D-- G e->e++++ h! !r y
------END GEEK CODE BLOCK------
Reply With Quote
  #3  
Old 05-26-2003, 11:25 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: aindexof()

Quote:
Originally posted by osrs
==================================
- aindexof(value,array)
calculates the positon of the first occurance
of value in the given array
==================================

I didnt get it,could someone explain me better?
Thanks.
...is it that hard to understand? geez x_X
a = {5,4,3,2,1,0};
b = aindexof(4,a);

b will equal 1
Reply With Quote
  #4  
Old 05-26-2003, 11:30 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Re: Re: aindexof()

Quote:
Originally posted by Python523

...is it that hard to understand? geez x_X
a = {5,4,3,2,1,0};
b = aindexof(4,a);

b will equal 1
We are different persons,you think it is easy to understand,i dont,maybe because my english is not very good,but now i get it.
Thanks Jagen & Jeff.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #5  
Old 05-28-2003, 10:16 PM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Re: aindexof()

Quote:
Originally posted by osrs
==================================
- aindexof(value,array)
calculates the positon of the first occurance
of value in the given array
==================================

I didnt get it,could someone explain me better?
Thanks.
It's very similar to #I.
#I(string,array).

It's used like they said above ^_^.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #6  
Old 05-28-2003, 11:35 PM
Jeff Jeff is offline
Registered User
Join Date: Oct 2002
Location: Nebraska, USA
Posts: 707
Jeff is on a distinguished road
Re: Re: aindexof()

Quote:
Originally posted by Knuckles

It's very similar to #I.
#I(string,array).

It's used like they said above ^_^.

No, it's like lindexof.

#I(sarray,index) is analogous to array access in the form:
array[index]
__________________
Jeff, the Archduke of Dustari
Member of the LAT on Graal The Adventure
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GO d+ s++:+ !a C++ UL+(UL+++)@ P+ L+(++)>+++ E---- W++@ N- !o ?K w(w--) !O !M@ !V PS- PE+ Y PGP t+ 5 X R tv(tv+) b++(b+)>b++++ DI(DI+) D-- G e->e++++ h! !r y
------END GEEK CODE BLOCK------
Reply With Quote
  #7  
Old 05-28-2003, 11:48 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: Re: aindexof()

Quote:
Originally posted by Knuckles

It's very similar to #I.
#I(string,array).

It's used like they said above ^_^.
The way you wrote it made it sound like the string was 2 dimentional, which it obviously isnt, #I(string,element) or #I(string,index) would be more correct
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.