- Joined
- Apr 30, 2013
- Messages
- 28
- Reaction score
- 2
- Primarily Uses
Hi everyone,
I'm trying to implement a catalog of books published in my novel publishing sim, in the most clean fashion with a bit of javascript. I have considered the route of manually creating variables, but I need about 150 arrays.
1. Player creates a new book - a book array is created, containing the Title of Book, Page Count, Quality Score, Royalties, Age of Book, etc (about 15 variables or more).
My current solution involves creating 150 variables manually, naming them Book01-Book150. I would like to be able to create a loop so that when a common event is called, like CreateNewNovel, it names a new variable Novel01Array, and then I'm able to use it in the rest of the procedures I want done.
The next call on the common event would create Novel02Array and so on for all 150.
I'm trying to implement a catalog of books published in my novel publishing sim, in the most clean fashion with a bit of javascript. I have considered the route of manually creating variables, but I need about 150 arrays.
1. Player creates a new book - a book array is created, containing the Title of Book, Page Count, Quality Score, Royalties, Age of Book, etc (about 15 variables or more).
My current solution involves creating 150 variables manually, naming them Book01-Book150. I would like to be able to create a loop so that when a common event is called, like CreateNewNovel, it names a new variable Novel01Array, and then I'm able to use it in the rest of the procedures I want done.
The next call on the common event would create Novel02Array and so on for all 150.