HEEEEEEEEELP! Just released prematurely!

Post » Thu Jun 21, 2012 10:28 pm

I know, the topic title lends to easy jokes. Moving on.

I just posted a thing that uses this script on a chest:
GlobalVariable Property PilferGlobal autoEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)int skip = 0float Weight = akBaseItem.GetWeight()int Value = http://forums.bethsoft.com/topic/1381970-heeeeeeeeelp-just-released-prematurely/akBaseItem.GetGoldValue()if (Weight==0.0 && Value> 0)  self.RemoveItem(akBaseItem, aiItemCount, true, Game.GetPlayer())  skip = 1	   endIffloat PilferVal = (Value/Weight)if (PilferVal >= (PilferGlobal.GetValue() as float) && skip==0)  self.RemoveItem(akBaseItem, aiItemCount, true, Game.GetPlayer())elseif (PilferVal < (PilferGlobal.GetValue() as float) && skip==0)  self.RemoveItem(akBaseItem, aiItemCount, true, akSourceContainer)endIfendEvent

that is supposed to give things above a given gold/weight ratio to the player, and otherwise give it back to the thing it came from.

Whats happening is its giving EVERYTHING to me and I don't know why! I released this thing, and its completely non-functional and I feel like a moron. Please advise!
User avatar
Tinkerbells
 
Posts: 3432
Joined: Sat Jun 24, 2006 10:22 pm

Post » Thu Jun 21, 2012 8:40 pm

Nvm. I wasn't launching using the SKSE Loader. Stupid me.
User avatar
Kayleigh Mcneil
 
Posts: 3352
Joined: Thu Jun 29, 2006 7:32 am

Post » Thu Jun 21, 2012 11:34 am

Sorry, I don't see anything wrong with it. Try adding a Debug.Trace() in there that will output the value of PilferVal to make sure that everything is working correctly.
User avatar
Daramis McGee
 
Posts: 3378
Joined: Mon Sep 03, 2007 10:47 am


Return to V - Skyrim