Thread: [Guide] Scripting in Essentials 101
View Single Post
  #11    
Old December 15th, 2012 (10:42 PM).
zingzags's Avatar
zingzags zingzags is offline
Creator or Pokemon Serenity
 
Join Date: Jan 2009
Location: Boston
Age: 21
Nature: Adamant
Posts: 552
@Musketeer
@Venom12
When you are using " $Trainer.party[0]", you are referring to the array party, which lies in the Trainer class "I think", remember computers start from 0, not from one. So when you are programming it is important to know that you always start at 0. But lets say you are trying to initialize an array, in lets say java or c++, what you would do is array_name[number of elements]. So for example pokemon[10], you will have 10 elements which can be used to hold a value. But as I said before to get the first value in the array, you would use pokemon[0].

$Trainer.party.length is the size of the array, so as Luka said before is true.
__________________
Pokemon Serenity is my fangame name.
name decided 12/15/09
Currently helping:
Pokemon ebony
and
Xenotime:
Reply With Quote