RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Type error in Cache

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 71
Upon entering battle (I'm using Tankentia 2.6, ya I know the older version.) I get error in Cache saying Type error, can not convert nil to string. Does any one have an idea what may have caused this?

*
Rep:
Level 82
Not without seeing the project and looking around what code is what. Something is trying to turn a nil object into a string, which you can't do because there's nothing to make a string.

Is that the only script(s) you're using or are there others? Sometimes it's another script trying to use a resource that hasn't been brought into existence yet or was maybe released before it got chance to convert it. Could be other things to.

I'd suggest the usual method of identifying the problem: make a new project and add in scripts one at a time, testing between each new script, and try to recreate the error. If you get that error again this way, you can figure which script may be the problem. Then if you can't figure what might be wrong, upload that project and I'm sure someone can take a look at it.
(Why do I always feel like it's the end of the world and I'm the last man standing?)

****
Rep:
Level 71
Dang it that's rather unfortunate, I uploaded the project . May be some one can figure it out right away. If how ever that's not the case then I will create a new project and copy the scripts. So yes I'm using several others.
« Last Edit: December 19, 2011, 04:14:38 AM by DoctorTodd »

*
Rep:
Level 82
You're link is telling me the download is "temporarily unavailable". It also told me this 6 hours ago when I last checked so I don't know how long "temporary" is.

If possible, can you re-upload that?
(Why do I always feel like it's the end of the world and I'm the last man standing?)

****
Rep:
Level 71
Alright here it is
« Last Edit: December 19, 2011, 04:14:09 AM by DoctorTodd »

*
Rep:
Level 82
The problem is, no filename has been given for the picture being loaded. A 'caller' call points to the culprit being something to do with trying to create a battleback.

I'll take a better look through the relevant code, but maybe that gives you n idea what might be up.

Edit: The offending script is Battle Backgrounds by Synthesize.

It takes the battle background associated with the map you are currently on. I've been making use of Battle Test to test battles specifically, and that would probably cause issues in itself since there is no map to start with.

It looks like a lot of work does that script to set up, since you need to specify a battle background for every map that has battles on it. If you don't set one up for a particular map, you will get a nil object name being passed into the Cache to load a picture which doesn't exist.

If you want to use this script, but not have issues when you don't have a map specified, you can use this fix to load up a default:

Replace line 37 of the script:
Code: [Select]
image = SynBattleB::Battle_background[$game_map.map_id]

with this:
Code: [Select]
    if SynBattleB::Battle_background.include?($game_map.map_id)
      image = SynBattleB::Battle_background[$game_map.map_id]
    else
      image = SynBattleB::Battle_background[0]
    end

Then make sure that the hash Battle_background has a key 0 with the filename of the default to use background.
« Last Edit: December 19, 2011, 01:48:57 AM by LoganForrests »
(Why do I always feel like it's the end of the world and I'm the last man standing?)

****
Rep:
Level 71
Thanks   :)