Sprite_Picture NilClass error?

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
I've making my latest game and everything runs smoothly, except for this door. What makes it strange it's that it only appears 2 out of 10 times I run the game and sometimes the sprite works fine....(the sprite is supposed to enter from a land with mist to a manor, which means the mist disappears, but it seems the problem is with the sprite anyway)

Sin título.png

Captura6.PNG
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
If "the sprite is supposed to enter from a land with mist to a manor", does that mean it's an event?  If so, it's not the event sprite that's having the issue.  It's Sprite_Picture, which means it's a picture you're showing.  That could well be fog.  The error indicates there is no bitmap for the picture.


You'd better show us the events that do picture stuff.


And do you have any scripts added that modify pictures?  Including scripts that do map lighting and stuff.  I do recall one or two that might have errors like this and I seem to recall that it's related to particular picture ids, which could mean you haven't set the script up properly (common for people who put a script in and don't look through it to see if it uses specific variables and switches, then uses the same variables and switches for other things).
 
Last edited by a moderator:

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
I've created some new maps in the meantime and the problem keeps happening. It seems the fog is the problem, since when I delete the image, the game runs fine. But "the map with fog" is a focal point of the first part of the story, so it the NilClass-error keeps appearing when I open doors to the manor.


No bitmap? I used the fog from this tutorial and I followed all the instructions, what could be wrong?


Ah no, currently the only script I'm using is Fomar's Faces to Busts, but I don't think there lies the problem.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,358
Reaction score
7,671
First Language
German
Primarily Uses
RMMV
Please show us the events that are using that fog picture.


There are several options what this could be, but we need to see how you're using the picture to continue to help.
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
Well, I'm using the fog as a parallel proccess while the average events and npc run normally.


(In Spanish)


UF.PNG


UF3.PNG


UF2.PNG
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Ahhh ... I bet I know what it is ... you say the issue is with doors?  So you're entering another building, and I assume you have an Erase Picture because you don't want the fog showing when you go inside?  This is probably what's going on - your door erases the fog, but the parallel process event here is still running, so it's trying to do a Move Picture on a picture you've erased.


To solve this, take the Erase Picture off all the door events, and put it on the interior maps instead.  Parallel process events, Erase Picture followed by Erase Event.


However, what happens when you come back to this map again?  You've got self switch B turned on for this event, so it's going to try to move the picture again, but it doesn't exist, so you're still going to have problems.  I would use a switch instead of a self switch - call it Fog Showing or something like that.  In the event above, turn that on in the first tab and use it as the condition in the second tab rather than the self switch.  Then on the events on your interior maps (or wherever you remove the fog picture), also turn that switch back off again.  So when you come back to this map, tab 1 of this event is active again.
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
This might sound like something a huge noob would said, but now I'm more confused than before.


I understand most of the instructions, except the thing about to edit all transfers that go to a different map to control off the fog moving switch and erase picture before the transfer command.


The story goes like this. It starts on the manor, a conversation happens, cue fade out and the MC is outside of the manor, plus fog. After asking some NPCs, the MC finds the key to the manor and returns. After some more maps and plot, the MC dies (because she was a decoy protagonist), cue another fadeout and the true MC is back outside of the manor, fog included. 


(This is the conversation that starts when being transferred from the manor to the fog land)


Captura6.PNG
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The story doesn't matter.


Can you show me the event for the door where this issue happens?  I'm betting you have an Erase Picture command in there?
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
I know it's irrelevant, but I mentioned it in order to prove how the fog land is a branch map.


Seems like I forgot to post the door event. I deleted the "Erase Picture" long ago, the main problem is the fog switch and the thing about to edit all transfers that go to a different map to control off the fog moving switch and erase picture before the transfer command.

7.PNG
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You need to disable the event that's trying to move the fog image before you delete the fog.  Otherwise you'll delete the fog, then the event will try and move it, and you'll get an error.  I'm not sure using the switch is the best way to go about it. 


What fog script are you using?  If it's mine, it has commands that will let you move the fog and change its opacity, so you wouldn't need to use event commands to do that.
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
To be honest, I did deactivate the switch in the door event, but the NiClass kept appearing. 


Oh, I tried to use Victor and Theo's Fog Scripts when putting the switch got too complicated, but the NilClass was still up there (one wasn't complatible with VX and the other put fog in ALL the maps, so I gave up.....)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You've still got a fog script call in there though - are you saying you don't have a fog script anymore, or that you still have one (or two) in there?  If you're not using them, you should probably get rid of them and remove the calls - it's confusing things.
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
No,what I'm saying is that I tried fog scripts, but one was incompatible and the other had that "NilClass error" too, so I gave up, deactivated them and sticked with the fog switch, but it's becoming too difficult. Any ideas? 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I am saying you still have a script call in that event that indicates you are using a fog script.  If you're not using a fog script, that means you've got remnants of it still hanging around, and you should clean up your event.
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
I did erased the fog scripts and the game runs normally now. Without the fog, though. I'm still not sure what to do now, seeing as the switch is becoming difficult to understand and not even the fog scripts are any help.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
So you must be using a fog script, if erasing the fog script is causing the fog to not show.  You need to pick one way of doing it - with scripts or without - and get rid of anything to do with the other methods.  Then we won't have several things trying to achieve the same goal, all conflicting with each other.  Trying to do something with events and with scripts is like having two or more scripts that are all trying to do the same thing - they fall over each other and cause problems that wouldn't be there if you only used one of them.


I suggest you go with the script and ditch the parallel process, the Show/Move Pictures and the switch idea.  If the fog isn't showing, then it means you're not using the script correctly, because fog showing is kind of the whole point of the script.  So remove all the other non-script stuff that's to do with the fog, set it up to use the script, and if it doesn't work, provide a link to the script (do not copy and paste the script here) and show screenshots of the events where you set up the fog or remove it.  Then we'll be able to move on from that point.
 
Last edited by a moderator:

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
Yes, it's better to ditch the switch, since it's complicating things more.


Well, I asked a third person, who adviced me to use Rafael Sol Maker's script. Unfortunately, now I have THIS problem....

5653.PNG
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
1411 is the Script event command.  You've got something wrong in there.  Sounds like you put filename instead of the actual name of the file.  And it needs to be in " ".


Screenshots of your events are always helpful.  Otherwise we're guessing at what's going on.
 
Last edited by a moderator:

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
Oh, I was about to tell you that I figured it on my own during the last hour. The problem was not the "filename", but rather the BLEND_ADD thing. It's new for me....


EDIT: Aw, forget it. I see that this is the same script created by the guy who could make a nice fog layer, but which it could only move as long as the NPC held a conversation..........Seems I'm back to square one.
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top