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 06-24-2009, 08:12 AM
Novice Novice is offline
Developer
Join Date: Dec 2008
Posts: 90
Novice is an unknown quantity at this point
Send a message via MSN to Novice
Multi-Dimensional Arrays

Just a quick question,
Are there 3x-dimensional arrays? I know there are 2x-dimensional arrays (this.array[0][2]), but I'm not sure if there are 3x-dimensional arrays (this.array[0][2][1]). I'm working on a database that I don't really want to reorganize without knowing this first.

For example:
PHP Code:
this.array = {
  { 
"Boo","Bar",{"BazBoo","BazBar"},"BooBar" },
  { 
"Bar","Baz",{"BooBar","BooBaz"},"BarBaz" }
}
return 
this.array[0][2][1]; 
Would the returned string be BazBar?

Last edited by Novice; 06-24-2009 at 08:22 AM.. Reason: accidentally posted early :o
Reply With Quote
  #2  
Old 06-24-2009, 08:53 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Should work.

Just tried it, and it does.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #3  
Old 06-24-2009, 11:41 AM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Theorehtically they are "Multi-dimensional", and you would be able to store an unlimited amount of arrays in each other.
__________________

Reply With Quote
  #4  
Old 06-24-2009, 02:22 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
You can have fivehundredsixtytwo dimensional arrays and beyond as far as I know.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #5  
Old 06-24-2009, 03:08 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Quote:
Originally Posted by xXziroXx View Post
You can have fivehundredsixtytwo dimensional arrays and beyond as far as I know.
Wonder if I should just repeat everything you say as well?
__________________

Reply With Quote
  #6  
Old 06-24-2009, 11:01 PM
Novice Novice is offline
Developer
Join Date: Dec 2008
Posts: 90
Novice is an unknown quantity at this point
Send a message via MSN to Novice
Thanks
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 05:44 PM.


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