We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How to make array in array ?
I want to:
chest variables:
chest X, chest Y, chestInventoryW, chestInventoryH
item variables:
itemPlace, itemId, itemCount
and the chest must have its items with variables.
the variables must be the same as I write here, you only need some example to see.
Here is example of Minecraft system...
Answers
Not working :/
Could you be a bit more specific? What is not working? Post your current code. Tell us what doesn't work. Tell us what you expected it to do. Tell us what it does instead.
The only answer we can give you to "It doesn't work." is "Then fix it."!
but i dont have any code... i want to only array on array :D
What does that even mean? What is an "array on array"? You want an array OF arrays? You want two arrays of the same length? You want an array of objects, and the object has a member that is an array? Or a 2D array member?
Do you understand the code I posted above?
@GeorgeJava:
It might be technically possible to model a Minecraft chest with a shovel in an array of arrays of arrays of arrays of arrays of arrays.
int[][][][] things;
...so
println(things[2][12][40][1])
prints "98":Chest 2, Object Slot 12, which is a Object Type 40 (Diamond Shovel), which has a grit (Parameter 1) of 98.
...but this is a terrible, terrible, terrible idea. Don't do this. Instead: DO use objects and classes. This is exactly what objects and classes are for.