christophercain3
Member
Im trying to convert variables and strings using RGSS. I understand how .to_s works. I also understand how .to_i, .to_f, and .to_a work. However, I am having trouble implementing them into my script.
I have created an array, for example @array = []
I then created data to be pushed into the array:
Finally I push the data into the array, however, since in my game I contain about 75 pieces of data, I would rather not use:
-or-
I began by trying:
However this does not work. Does anyone know how to correctly arrange and convert these data? Thanks in advanced!
I have created an array, for example @array = []
I then created data to be pushed into the array:
Code:
@array = []
@data1 = []
@data1 = [x, y, z]
@data2 = []
@data3 = [a,b,c]
.
.
.
etc...
Code:
@array.push(@data1)
@array.push(@data2).......
-or-
Code:
@array.push(@data1, @data2, ......................................................)
I began by trying:
Code:
@array.push(("@data" + (1...75).to_s).to_a)
However this does not work. Does anyone know how to correctly arrange and convert these data? Thanks in advanced!