RPG Maker Forums

Evening guys,i making a a generator for assigning matches for each team,long story short,this was supposed to be the final part of completing it,i made some lines of code,i spend more than 4 hours,andi just can't figured out why the life of me the result of this,i narrow down the issue and is the code i'm having problem with:

◆Script:$gameVariables.setValue(14, [1, 2, 3]);
◆Script:$gameVariables.setValue(16, $gameVariables.value(14)[1]);
◆Script:$gameVariables.value(14)[1] = $gameVariables.value(14)[2];
◆Script:$gameVariables.value(14)[2] = $gameVariables.value(16);
◆Script:$gameVariables.setValue(61, $gameVariables.value(14));
◆Comment:stop
◆Script:$gameVariables.setValue(16, $gameVariables.value(14)[1]);
◆Script:$gameVariables.value(14)[1] = $gameVariables.value(14)[2];
◆Script:$gameVariables.value(14)[2] = $gameVariables.value(16);
◆Script:$gameVariables.setValue(62, $gameVariables.value(14));

so i made an array in variables 14,as you can see,before the comment "stop",array 14 will be assign to array 61 which is (1,3,2),when i execute the code before the stop comment,there's no issue,
but execute as a whole,then that's the problem,the 2nd one is true,variable 14 return (1,2,3) and yes just like the code intended,but,when opening console log(not sure what it's named) by pressing F9,both variable 61and 62 are (1,2,3) ,any last variable will replace all the previous assign variable,let add another one on above

◆Script:$gameVariables.setValue(14, [1, 2, 3]);
◆Script:$gameVariables.setValue(16, $gameVariables.value(14)[1]);
◆Script:$gameVariables.value(14)[1] = $gameVariables.value(14)[2];
◆Script:$gameVariables.value(14)[2] = $gameVariables.value(16);
◆Script:$gameVariables.setValue(61, $gameVariables.value(14));
◆Comment:stop
◆Script:$gameVariables.setValue(16, $gameVariables.value(14)[1]);
◆Script:$gameVariables.value(14)[1] = $gameVariables.value(14)[2];
◆Script:$gameVariables.value(14)[2] = $gameVariables.value(16);
◆Script:$gameVariables.setValue(62, $gameVariables.value(14));
◆Comment:stop
◆Script:$gameVariables.setValue(16, $gameVariables.value(14)[1]);
◆Script:$gameVariables.value(14)[1] = $gameVariables.value(14)[2];
◆Script:$gameVariables.value(14)[2] = $gameVariables.value(16);
◆Script:$gameVariables.setValue(63, $gameVariables.value(14));

now i'm assign into 3 variables,which is 61,62,63

at variable 61,the value of variable 14 is (1,3,2) = variable 61 is now (1,3,2)
at variable 62,the value of variable 14 is (1,2,3) = problem is both variable 61 and 62 is (1,2,3) despite i did not assign it to variable 62
at variable 63,the value of variable 14 is (1,3,2) = now all 3 variable ,variable 61,variable 62, and variable 63 has same value (1,3,2) and not just variable 63

what am i doing it wrong,if this is indeed a bug,then i'm really am screwed,this is the last step for me to finish creating league table for sports,if anyone have better code or find flaws on the code above,that would really really helps me a lot.I will reply as soon as i can get since i might be at work.

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top