Help - Search - Members - Calendar
Full Version: *Sigh*
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS2
Under
When I start my game now I get an error code that says, "Script 'Game_Variables' line 20: TypeError occurred. no implicit conversion from nil to integer." Maybe I should mention that I just recently went through my RGSS2 file and deleted everything I don't think I'll ever be using, like face sets. So, where is the problem? I'm guessing it has something to do with my variables, or not being able to read the variables?
Atoa
NEVER delete the default scripts. Unless you know what you're doing, wich isn't your case.
Scritps aren't magic, that you delete a code and it not used.

Many codes are required by ANOTHER codes, and if it's missing... *error*

You can't simply delete everything you think you will not need, it's needed also to change all over the other scripts the code that calls the parts you deleted.

In other words, put everything back or you totally screwd. And ask someone with at last some knowledge in scripting to make the changes you need.
Under
I didn't delete any code, I deleted some of the files in the RGSS file. Facesets, the original bgm, bgs, sfx, animations, and battlers that come with the game to save up more space. I don't really think it's the problem, but it's the only thing I can think of I did lately that might have caused the error code. I just need to know the problem so if I did anything to cause it I can either put the file back and fix it, or whatever would be causing the error.
Atoa
Did you delete files from data folder? If not, there's no way that deleting graphics or sounds would cause this error.

Try replacing you Scripts.rvdata with one from a new game (just create a new project and copy the file).
Titanhex
Sounds to me like you're trying to convert a nil value into an integer, usually by applying a method that must take an integer.

My guess is whatever variable you're trying to manipulate, it has no value tied to it. Try tying a value to the variable in question.

You can find out what variable is causing this by checking your starting point map. Or, you can check your scripts to see if you didn't set them up right, or put in a bad value.

In a case like this it helps to list your scripts you're using and links to them. Putting them in textbins and linking to them can help if you can't find the original site for them.

Also, does this happen immediately when you go to play the game, when you hit new game, when you load a game, etc?
Under
QUOTE (Atoa @ Sep 22 2011, 05:00 PM) *
Did you delete files from data folder? If not, there's no way that deleting graphics or sounds would cause this error.

Try replacing you Scripts.rvdata with one from a new game (just create a new project and copy the file).

Hmmm. Well I replaced the Scripts.RPGVX Data from the game file like you said and the game will load the game now. Thanks very much! I'm not sure how that happened... maybe I messed with something without remembering, but I don't think I did.... Now I just have to put the scripts I had back into the game and set them up again....
Under
QUOTE (Titanhex @ Sep 22 2011, 05:13 PM) *
Sounds to me like you're trying to convert a nil value into an integer, usually by applying a method that must take an integer.

My guess is whatever variable you're trying to manipulate, it has no value tied to it. Try tying a value to the variable in question.

You can find out what variable is causing this by checking your starting point map. Or, you can check your scripts to see if you didn't set them up right, or put in a bad value.

In a case like this it helps to list your scripts you're using and links to them. Putting them in textbins and linking to them can help if you can't find the original site for them.

Also, does this happen immediately when you go to play the game, when you hit new game, when you load a game, etc?


The problem was probably that I messed up when I was readjusting the scripts in my game last night. It gave me the error when I loaded a game or started a new one, but I thought it might be the map or the starting event on the map so I made a new map and started there with no events and the same thing happened all ready.

As I said above, I all ready deleted the script file, so I'll have to put the scripts I was using back in, but this time when I'm changing them for my game I'll make sure they work before I move on to another one.

Thanks both of you for helping me to figure this out.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.