Hello,
I'm new to RPG Maker and everything related to coding. I get an error message and can't figure out why. No plugins used, just the basic program.
I created an event and when I walk over it it does:
and in the end it tells me:
$gameVariables.setValue(30,[1,2,3,4]);
$gameVariables.setValue(31,$gameVariables.value(30)[2]);
$gameVariables.value(30).push("test");
$gameVariables.value(31).push("test");
\V[30] is displayed as I wanted it to be: 1,2,3,4,test
\V[31] generates the error message but I wanted it to say: 3, test
Why?
What I want to do in the end is the following: Create a character with different attributes. Later I want to check if a certain attribute is x or y and then do something depending on the result. I searched how to modify these things and found that you can for example .push and .slice arrays and thought this might be useful, so I tried. Not very well it seems.
Thank you for reading.
I'm new to RPG Maker and everything related to coding. I get an error message and can't figure out why. No plugins used, just the basic program.
I created an event and when I walk over it it does:
and in the end it tells me:
$gameVariables.setValue(30,[1,2,3,4]);
$gameVariables.setValue(31,$gameVariables.value(30)[2]);
$gameVariables.value(30).push("test");
$gameVariables.value(31).push("test");
\V[30] is displayed as I wanted it to be: 1,2,3,4,test
\V[31] generates the error message but I wanted it to say: 3, test
Why?
What I want to do in the end is the following: Create a character with different attributes. Later I want to check if a certain attribute is x or y and then do something depending on the result. I searched how to modify these things and found that you can for example .push and .slice arrays and thought this might be useful, so I tried. Not very well it seems.
Thank you for reading.