WSE Problem - Inventories

Post » Fri May 27, 2011 11:43 pm

Its really late so please excuse my abruptness: this script has worked before but now it doesn't. It runs on a container so I never needed to explicitly set its reference in the script. Anyone got any ideas why? Nothing is printed and the game CTD's instantly.


;Test script for interacting with triggers. Controls the removal and;of sub-components and triggering of the actual trapbegin iio_sc_trigTest01short doOnceshort error    ;0 if the thing can be made, 1 if it can'tshort numGearsshort numBowlsshort numCorrect ;number of materials that are there in their correct quantitiesshort buildGo    ;if its one it means we can build itshort resetAllshort scanCompleteshort scanTestSpdrshort activatedGoshort menuGoshort checkInventoryfloat myXfloat myYfloat myZfloat workVar1float workVar2float workVar3float timeDelayfloat delayForCTDfloat killTimerlong invitem    ; name of the item (i.e. gold_001, ingred_ruby_01, etc.)long invcount   ; amount of the item (i.e. 327 gold_001, etc.)long invref     ; pointer to next item (unused in this script)long pcreflong prospectidlong tempif ( doOnce == 0 )	set doOnce to 1	set numGears to 2	set numBowls to 1	set numCorrect to 2	set timeDelay to 1	set delayForCTD to 0	set killTimer to 0	Messagebox"Finished init..."endifset checkInventory to 1ifx ( checkInventory )	Messagebox"Checking inventory..."	set checkInventory to 0	setx invitem,invcount,invref to xInventory      ; get first item	Messagebox"HERE   1"	whilex ( invcount )		Messagebox"HERE  2 "		setx invitem,invcount,invref to xInventory  ; get another item		Messagebox"HERE  3 "	endwhile	Messagebox"Scan is complete."	endifend iio_sc_trigTest01

User avatar
Grace Francis
 
Posts: 3431
Joined: Wed Jul 19, 2006 2:51 pm

Post » Sat May 28, 2011 5:14 am

Glancing at the script it looks like you would have multiple message boxes per frame; isn't that one such cause of instant CTD? I can't recall if it should still print the first message box before crashing, however.
User avatar
Lily
 
Posts: 3357
Joined: Mon Aug 28, 2006 10:32 am


Return to III - Morrowind