Jump to content
Aveyond Studios Community
Sign in to follow this  
whitekitten

Error message with Commercial script

Recommended Posts

I'm using Amanda's commercial kit scripts and I have an error message when I start to testplay. it says:

 

Script 'Game_System' line 90: NoMethoderror occurred.

undefined method '+' for nil:NilClass

 

Here's the surrounding lines of text:

86:#----------------------------------------------

87:# * Load a file (not save game)

88:#----------------------------------------------89:def load_file(filename)

90: path = $appPath + "\\" + filename

91: f = open(path, "rb")

92: while not f.eof?

93: value = f.gets

94: end

95: f.close

96: return value == "true" ? true : false

97:end

 

I know it has something to do with the filepath name being created, but I don't know how to fix it...

Share this post


Link to post
Share on other sites

No - the line numbers are not in the actual code and line 88 & 89 are separate in the actual code..

that was just me cutting and pasting poorly last night

 

edit: I also have Amanda's Journal Script and Ccoa's UMS included in this project... but these shouldn't interact with that line....

Share this post


Link to post
Share on other sites

ah, okay. It's the $appPath that it doesn't like then.

 

Just check your code and make sure it's complete. Can you find where $appPath is set? If not, post a link to the page where you got the script, and I'll see if I can find it.

Share this post


Link to post
Share on other sites

OK! When I copied the scripts over I missed one ;o

Thanks Shaz - I went through the scripts again.

 

However I am still getting an error, and I had the same problem with the demo, (btw found the kit from rpgrevolutions)

 

When the game opens it defaults to an active Continue as if it already has a file saved. When I click on it I get this error:

 

Unable to find the file Graphics/Characters/Scarllet

 

It also happens when I go to save or load as well

 

I don't have a character Scarllet, neither does the demo, and I can't find a refence to that in the scripts.

Share this post


Link to post
Share on other sites

It sounds like you've got a save file from another game - a game that had a character named Scarllet. If you don't recall making a save file and you have no reason to load it, just ignore it - start a new game, save that, then reload it and see if it works okay ;)

Share this post


Link to post
Share on other sites

Please be more specific. "Can't even get there" doesn't help me figure out where the issue is at all.

 

Do you get another error? What does the error say? If it gives a line number, what is at that section of code in that script?

 

It may be that you've again missed something in copying the scripts, so it might pay to go back to the source and check everything again and make sure nothing else has been left out.

 

 

Oh, and you didn't specify, but you ARE using XP, right? Because that's the engine the scripts are written for. You'll get a lot more errors if you're trying to use it in VX.

Share this post


Link to post
Share on other sites

I'm so sorry.. I need to stop posted at 3AM my time... I am using XP

 

I have no line numbers in the error, it only says:

Unable to find the file Graphics/Characters/Scarllet

 

it occurs at the start screen, and the save from menu screen... I cannot restart the game and save over it because I cannot get to the save screen

 

I did go back through all the scripts but I had this problem with the demo as well.

 

Neither the demo or any of my games have a character graphic called scarlett, and I still can't find a reference to that graphic in the scripts

 

I hope this is more elaborate than my last post...

Share this post


Link to post
Share on other sites

So is this the error that appears when you try to go to the save screen? It sounds like you have a save file that you didn't create and don't want, and IT has a character called Scarllet in it. When you go to save your game, it's loading all the names of the save files so you can decide if you want to save over them, and one of those has a character named Scarllet, for which you don't have a sprite. So it crashes before it shows you the screen. (This happens if your save screen shows an image of the characters in your party, like the Aveyond games do)

 

My suggestion would be to determine where the save files are being kept, and go and delete them all - especially if you haven't created any of them. Or if you're a little paranoid, you could copy them into another folder before deleting them from the save location. That'll stop it trying to load the file, which SHOULD stop it trying to find that character sprite :)

 

Another alternative would be to just go into your Graphics/Characters folder, grab a character sprite, copy it and call the copy Scarllet.png, so the script DOES find it when trying to add the save file to the screen (though you'll probably get another error for the next character, and the next ...)

 

If you continue to have problems, please provide a link to the scripts you're using. I could just search through the forums, but that'd take more time than I have available, and no guarantee that I'd find the right ones.

Share this post


Link to post
Share on other sites

Here is the link to where I found the script:

http://www.rpgrevolution.com/forums/index.php?showtopic=35647&hl=

 

I just tried adding a character named Scarllet, and it did go to the next character... for whatever reason it is going through the characters for Vagrant Hearts (which I should have realized with scarlett)... which the exe file is loaded on my computer as I am currently playing it...

 

do I need to delete my vagrant hearts game? won't that continue to interfere with other games on my system?

Share this post


Link to post
Share on other sites

It sounds like your game is looking at the same folder that Vagrant Hearts saves its data in.

 

No, don't delete them. Go through your script to find where it states what folder to use for save files, and change it.

 

I wonder why it's using the same folder? Hopefully if that uses the same script, they've actually customized the save path and not just used the default. You need to do the same. Don't just accept %appdata%, but add a company/game name to the path to save the files in as well.

Share this post


Link to post
Share on other sites

It worked!! I went into the "Start Game" script and there is a line (18) that says "\\YOUR GAME NAME"

 

so I changed it to my game's name...

I guess the original VH did not change that...

 

As always Shaz - you are amazing with your help!! Thank you again for taking the time... I'm still a newbie to scripts

 

hopefully the tail end of this topic will help others with Amanda's commercial kit as well!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×