RemoveAllItems Issue

Post » Sat Feb 19, 2011 9:33 am

Hello. Thanks for stopping in. The problem is simple. I have created a mod with a new container inside of a new cell, which I also made. Let's just call this container "NateContainer". Whenever my mod attempts to run the following command:

NateContainer.RemoveAllItems

The game CRASHES and I'm left staring at my desktop wondering what happened, as I still am. I can not get any script in my mod to empty the container without crashing my game. Any instance of the command mentioned above will crash the game. I even tried adding it to a spell with a script effect instead of a regular quest script or other form of script. Upon casting the spell the game crashes. What am I doing wrong here? I know this command works. I have used it on other containers before. For some reason it just doesn't seem to want to operate correctly when used on mine. If any experienced script writers are reading this, please enlighten me. I am completely at a loss here. Thanks.

Summary to help limit eliminate basic solution offerings and narrow down the issue...

-The container IS called using the reference ID, not the base ID.
-The container IS marked as persistent in the cell.

-Nate
User avatar
Chris Johnston
 
Posts: 3392
Joined: Fri Jul 07, 2006 12:40 pm

Post » Sat Feb 19, 2011 10:00 am

Is 'NateContainer' or whatever the actual name of the container the editor id of the base object or is it the reference of a specific container that you have placed in the world? It needs to be the latter. Just a suggestion.
User avatar
Jennifer Rose
 
Posts: 3432
Joined: Wed Jan 17, 2007 2:54 pm

Post » Sat Feb 19, 2011 3:31 am

Is 'NateContainer' or whatever the actual name of the container the editor id of the base object or is it the reference of a specific container that you have placed in the world? It needs to be the latter. Just a suggestion.


It is the the value under the "Reference Editor ID" field for the particular container in the cell. Thanks for the suggestion. This part is okay though. I'm positive that is not the underlying issue. This is something else, and apparently something I'm not thinking about at the moment.

The issue is that whenever I call that reference using RemoveAllItems, like shown above (NateContainer.RemoveAllItems) the game simply crashes. This happens no matter how I run the command. There must be some common factor that is causing this. Any more ideas are definitely a help.
User avatar
Scarlet Devil
 
Posts: 3410
Joined: Wed Aug 16, 2006 6:31 pm

Post » Sat Feb 19, 2011 4:09 am

I'd guess that the container is not the problem, but an item in it is. If something in its content has a script on it that triggers on the removal, then that script could cause the crash.

You can confirm that by changing the content in the CS to just a single piece of gold, and retrying. If the crash goes away, re-examine the original list of contents.
User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Sat Feb 19, 2011 12:59 am

Is the container a persistent reference?
User avatar
Amie Mccubbing
 
Posts: 3497
Joined: Thu Aug 31, 2006 11:33 pm

Post » Sat Feb 19, 2011 8:04 am

I'd guess that the container is not the problem, but an item in it is. If something in its content has a script on it that triggers on the removal, then that script could cause the crash.

You can confirm that by changing the content in the CS to just a single piece of gold, and retrying. If the crash goes away, re-examine the original list of contents.


I will try this. I will update this response once I have. Keep the ideas coming!
User avatar
stacy hamilton
 
Posts: 3354
Joined: Fri Aug 25, 2006 10:03 am

Post » Fri Feb 18, 2011 9:49 pm

Is the container a persistent reference?


Yes sir it is.
User avatar
Wayland Neace
 
Posts: 3430
Joined: Sat Aug 11, 2007 9:01 am


Return to IV - Oblivion