Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
563
Reaction score
240
First Language
PT-BR
Primarily Uses
RM2k3
I did the test and it worked, maybe variable 118 has become a String.
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
178
Reaction score
38
I did the test and it worked, maybe variable 118 has become a String.
what 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?1619695912037.png
i ran the code on the game console this what it shows
 
Last edited:

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
563
Reaction score
240
First Language
PT-BR
Primarily Uses
RM2k3
I don't know what may be causing the problem, maybe some function has been replaced.
array-includes_rez.png

Try to run one command at a time, without the "var" prefix:
  1. pool = [1,2,3,4,5] Press (Enter)
  2. pool.includes(10) Press (Enter)
  3. pool.includes(3) Press (Enter)
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
563
Reaction score
240
First Language
PT-BR
Primarily Uses
RM2k3
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:
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;
}
 
Last edited:

Latest Threads

Latest Profile Posts

It's almost 3 month and this piece of drawing is still not finished yet.
aaaa.jpg

Really busy with other stuffs like commission and coping with personal problem.
Stella & Elyune, maybe used for promotional art if my game project finished one day.
My ex put my heart upon a self he said don't give me no lines and keep my hands to myself :,(
An Old... old Harold | RPG Maker News #71

Did a test on myself and I was negative on COVID. I was sitting near my aunt the whole time while doing stuff.

Forum statistics

Threads
112,248
Messages
1,066,816
Members
145,854
Latest member
markikilouis231
Top