Can't convert String into Integer error,but not always!

Punisher699

Veteran
Veteran
Joined
Jul 3, 2014
Messages
85
Reaction score
18
First Language
French
Primarily Uses
Hello , I used to have the same issue popping up sometimes, when I put a teleport . Always the same game_variable(19) , no idea what is it .(not even on my console log)


Most of the time I just put my teleport elsewhere or a different way and it works . But now , I got the same error when I'm trying to teleport on a map


once again , but this time I really want to fix it ! 

I can teleport 10 times on the same event nothing happens , but the 11th time , it does ... it is frustrating . Now I created an event and it is permanent , so this is


a good time to find the problem , do you know where I can start ? Please :(


Thank you ! :)

errorSuiko.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
Please provide a screenshot of the event where you use the commands


That said, this looks like somewhere else in your script you assign a text-string to that variable instead of a number, and when that happened and you try to use the variable in the teleport command the game crashes.


Since it doesn't happen every time, it is most likely done in either a parallel process in the background or in a plugin.


Please search all plugin configurations on where else that variable might be used.
 

Punisher699

Veteran
Veteran
Joined
Jul 3, 2014
Messages
85
Reaction score
18
First Language
French
Primarily Uses
$game_player.actor.walking_sprite_name =
'$[f7]Party_Riou_World'
$game_player.actor.walking_sprite_index = 0


So it was this script call this time , I put it after my teleport command and it works , but not before it, for some reason. 

This script call is for Orange Movement Script , and f7 is a multiframe from viktor 
 


PS: I'm using this call to change my character pose graphic (world map boat)
 


Maybe an issue with his script...
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
Go to your script and find Game_Variables and change it to look like this (from line 18):

Code:
def [](variable_id)
  p 'variable id is ' + variable_id.to_s
  @data[variable_id] || 0
end


Now enable the console (Game menu, Show Console) and play.  When you get the error, see what was printed out on the console as the last 'variable id is ...'


It would be strange for a script to do this - I'm wondering if you're using a command somewhere where the variable is contained inside another variable id, and THAT variable is being set to a string somewhere.  You can do this through script calls or through the Change Variable command in addition to actual scripts.


I don't think it is that script call that's doing it.
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
You can also use a script which uses that variable for some automatic process, and you use that same variable for something else too (in eventing or for another custom script).


That can trigger the error too, and that cause sounds the most possible for me. Many people forget which variables they used in their long forgotten custom scripts in the project.


You can shrink the amount of possible causes by checking if you ever set a variable to a string with events (people rarely do this, from what I saw).


If you do, start your search in those events, check the variable used, and change it to a different one.


If you don't do that ever in events, than the issue comes from a custom script for sure, so start your search there for any scripts which use variables for their operations.


I don't think that Orange Movement got anything to do with the error you get, and that script call you use should mess with any variables either. 


In any case, make sure to do what Shaz wrote, that is the quickest way to find the source of the error for sure.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
To avoid the situation above, you should ALWAYS name your variables whenever you use one in an event or a script, or (for MV) in plugin parameters.  This ensures that all variables being used can be identified easily, and you'll never accidentally use one for different purposes.  This means whenever you add a script, you NEED to go through at least the top part with customization options, and see what variables and switches they are using, and name them if you're not using them for something else, or if you are, find one you're not using, name it, and change the script to use it.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top