I did the test and it worked, maybe variable 118 has become a String.
MV Show Picture Based on Item ID
Learning Javascriptwhat i want to achieve is when a card drawn is from the array of legend cards.. a special flash screen or special sound or special picture occurs.. how do i reverse it? or should i just assign a new gameVar?
i ran the code on the game console this what it shows
I don't know what may be causing the problem, maybe some function has been replaced.
Try to run one command at a time, without the "var" prefix:
Try to run one command at a time, without the "var" prefix:
pool = [1,2,3,4,5]Press (Enter)pool.includes(10)Press (Enter)pool.includes(3)Press (Enter)
still error
Try to do the test from your internet browser console and if possible install others to do the same test.
If nothing works it will be necessary to create the function manually.
Edit:
Or:
If nothing works it will be necessary to create the function manually.
Edit:
JavaScript:
Array.prototype.includes=function(el,ind){
var exist=false;
if(!ind){
ind=0;
}
for(i=ind;i<this.length;i++){
if(this[i]==el) {
exist=true;
}
}
return exist;
}
Or:
JavaScript:
Array.prototype.neoincludes=function(el,ind){
var exist=false;
if(!ind){
ind=0;
}
for(i=ind;i<this.length;i++){
if(this[i]==el) {
exist=true;
}
}
return exist;
}
Original thread: https://forums.rpgmakerweb.com/threads/show-picture-based-on-item-id.135904/