Hello!
I am trying to learn javascript and I am a complete noob with everything that it has to do with coding.
After some tutorials I made a test plugin
The plugin just states a variable
after that I have 2 functions
So after turning on the plugin in rpg maker, I tried to call the rageadd function on a skill by typing on the notes
The variable doen't add 5 and it stays 0.
After that I tried to change the function #1 to:
to see if is calls the function in the console but that doesn't work either..
so.. what am I doing wrong?
I am trying to learn javascript and I am a complete noob with everything that it has to do with coding.
After some tutorials I made a test plugin
The plugin just states a variable
Code:
var rage = 0;
after that I have 2 functions
Code:
function rageadd(number) {
rage += number;
}
function ragesub(number) {
rage -= number;
}
So after turning on the plugin in rpg maker, I tried to call the rageadd function on a skill by typing on the notes
Code:
rageadd(5);
The variable doen't add 5 and it stays 0.
After that I tried to change the function #1 to:
Code:
function rageadd(){
console.log("123");
}
to see if is calls the function in the console but that doesn't work either..
so.. what am I doing wrong?