Sorry about the formatting this code tag is kinda twitchy. If I comment out the clearing of the hotkeyItem list at the bottom, problem goes away, but that defeats the purpose. Iv'e learned over 30 years of banging bits for a living to code defensively, and that applies in spades with TES script. The problem is in the loop at the bottom of the GameMode block you'll see some extra code in a few places that I put in on hunches and haven't removed yet. Here's the code maybe you can spot something that's causing a problem I've been fighting it for weeks now. The removal works sometimes, the first time, but never a second it gives me a CTD. Was there something in particular you were looking for?Īppreciate the links, and yeah, there is something specific I'm having problems with removing from a formlist I use it to build a list on the fly of hotkeyed weapons so I don't remove them to storage. I've done a bunch of inventory stuff in my FO3 mod. His tutorials are here, but I didn't see anything for FOSE/NVSE inventory functions. Would it compile despite not being implemented?Īrrogant SId Posts: 3366 Joined: Sat 11:39 am and I don't know why.ĮDIT: If "Inventory walking functions" from the NVSE thread's Not Implemented list means GetInventoryObject, I think I might though.
However, I'm having my own problem where this loop just keeps repeating since I see the same index value displayed over and over again. Set iIndex to player.GetNumItems - 1Label 10set rCurrentItem to player.GetInventoryObject iIndexif (iIndex >= 0) ShowMessage gccrMessageGeneralIntegerTest iIndex <- This is how I know it's detecting the correct number of items set nSetCapsAmount to GetValue rCurrentItem set nSetCapsAmount to (nSetCapsAmount * fExchangeRate) rCurrentItem.SetItemValue nSetCapsAmount set iIndex to iIndex - 1 Goto 10endif I doubt that is his problem, as I'm current using the below code fragment and getting the correct number of items: Try setting it without the -1, then below it do set ListIndex to ListIndex - 1Īnd ya it does compile I was using number not num. Not sure you can tack on the - 1 like that. Helen buchan Posts: 3464 Joined: Wed 7:17 amĬould be the way this line is phrased "set ListIndex to Player.GetNumItems - 1". it's the GetNumItems and the GetObjectType that don't work.
That one IS documented, and that part of the script works I successfully enumerate the hotkeys. The NVSE documentation states that it gets hotkey slots 1 through 8. As to Index, it's set to 1 before a label, incremented below the segment of code I showed, and jumps back to the label if <= 8. I'm using the Beta 6 that everyone has, and GetNumItems does compile, although it's not documented I found a reference to it in a script sample browsing this forum. I can't even compile a script using that function so something is strange there. Next I'm not sure GetNumberItems is supported in the current beta of NVSE unless you have a newer version that I don't have. Maybe it's in some part of your script though. For instance this line "set rItem to GetHotKeyItem Index" I'm guessing index is a short variable? If so where are you setting it, if you just call it like that index = 0 which would return 0 for rItem. Hard to tell exactly what's happening without more of your script.