I am refering to coding a script.
How do I code 0001: V to equal to 0002: W in RPG Maker VX Ace coding
Learning Ruby and RGSSx............omg it's the most clear thread I ever saw of my life *sarcasm*
can you ever bother to really describe your content ....we are not mind reader.
can you ever bother to really describe your content ....we are not mind reader.
In a script in RPG Maker VX Ace
how to I properly for completely working error free
variable 0001:V to equal to
variable 0002:W
how to I properly for completely working error free
variable 0001:V to equal to
variable 0002:W
I've moved this thread to Learning Ruby and RGSS. Please be sure to post your threads in the correct forum next time. Thank you.
I think you should take the time to work through some tutorials for learning Ruby - there are several linked in this part of the forum.
That is because variable assignments are the most basic aspect of any programming knowledge - if you have to ask for that, then you're extremely new to programming and should take one step after another instead of scripping the basics.
I think you should take the time to work through some tutorials for learning Ruby - there are several linked in this part of the forum.
That is because variable assignments are the most basic aspect of any programming knowledge - if you have to ask for that, then you're extremely new to programming and should take one step after another instead of scripping the basics.
I saw your other thread.
Your code looked like Java.
If you know how to code and don't know hot to refer to a game variable, you should ask for THAT, not how to code a simple assign value to a variable.
$game_variables[n]
is an array of variables with n starting from 1.
1 is fro variable 0001
2 is for variable 0002
and so on.
I don't know Ruby but I feel that you sef-sabotage yourself by asking the wrong question. 🙂
What you need to do is this I suppose:
$game_variables[1] = $game_variables[2]
If you don't wanna assign the value of variable 0002 as the new value of variable 0001, but compare those to see what to do next...
well you see what I mean? We can not really understand what exactly you need.
"In a script in RPG Maker VX Ace
how to I properly for completely working error free
variable 0001:V to equal to
variable 0002:W"
Tell me what does that mean?
Does it mean "I want to assign to variable 1 the value of variable 2" or does it mean "I wanna check if variable 1 is equal to variable 2"?
In your other thread your question looks like a person's that knwos a little about coding. Here it looks like you understand nothing. I mean you don't express what you need in a way a coder can unserstand you.
In any case, if you are new to Ruby, I strongly recommend you to do what @Andar said.
Actually I suggest you sticking with eventing system before learning Ruby (by learning I mean learning well) and use scripts only in dire need.
I got nothing else to say, hope that helped you.
Your code looked like Java.
If you know how to code and don't know hot to refer to a game variable, you should ask for THAT, not how to code a simple assign value to a variable.
$game_variables[n]
is an array of variables with n starting from 1.
1 is fro variable 0001
2 is for variable 0002
and so on.
I don't know Ruby but I feel that you sef-sabotage yourself by asking the wrong question. 🙂
What you need to do is this I suppose:
$game_variables[1] = $game_variables[2]
If you don't wanna assign the value of variable 0002 as the new value of variable 0001, but compare those to see what to do next...
well you see what I mean? We can not really understand what exactly you need.
"In a script in RPG Maker VX Ace
how to I properly for completely working error free
variable 0001:V to equal to
variable 0002:W"
Tell me what does that mean?
Does it mean "I want to assign to variable 1 the value of variable 2" or does it mean "I wanna check if variable 1 is equal to variable 2"?
In your other thread your question looks like a person's that knwos a little about coding. Here it looks like you understand nothing. I mean you don't express what you need in a way a coder can unserstand you.
In any case, if you are new to Ruby, I strongly recommend you to do what @Andar said.
Actually I suggest you sticking with eventing system before learning Ruby (by learning I mean learning well) and use scripts only in dire need.
I got nothing else to say, hope that helped you.
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-code-0001-v-to-equal-to-0002-w-in-rpg-maker-vx-ace-coding.54358/