Help editing natural hunger mod with SI meat

Post » Sat Feb 19, 2011 5:39 am

I use a mod called QueenaFarts' Natural Hunger Mod v2.1 that adds hunger to the game, and uses global scripts to control hunger levels. Because of this, anything that is a food takes away hunger, even if it wasn't in the original game, but meats are special, as they are more filling than other foods. This is the relevant code (sans edits):

Scn QFNatHun2EatScriptshort doOnceshort numeffectlong effectCodelong REFACodelong REHECodelong ingEatenlong maxStomachfloat fQuestDelayTimefloat baseWeightref refObjBegin MenuMode 1002if doOnce == 0	set fQuestDelayTime to .1	set REFACode to (GetMECode REFA)	set REHECode to (GetMECode REHE)	set baseWeight to (GetWeight Apple)	set ingEaten to (GetPCMiscStat 11)	set maxStomach to 2000	set doOnce to 1endif; **Check to see if food is eaten**if (GetPCMiscStat 11) > ingEaten	set numeffect to player.GetActiveEffectCount	;Find the latest ingredient in effects list	Label	set numeffect to numeffect - 1	;failsafe	if numeffect <= -1		set doOnce to 0		return	endif	set refObj to (player.GetNthAEMagicItem numeffect)	if (GetMIType refObj) != 4		Goto	endif	set effectCode to (player.GetNthAECode numeffect)	set ingEaten to (GetPCMiscStat 11)	if IsFood refObj		set QFCycle to 1		if effectCode == REFACode			;known fruits			if (NameIncludes "Apple" refObj)				set QFStomach to QFStomach + 55			elseif (NameIncludes "Blackberry" refObj)				set QFStomach to QFStomach + (55 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Graqes" refObj)				set QFStomach to QFStomach + (55 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Orange" refObj)				set QFStomach to QFStomach + (55 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Pear" refObj)				set QFStomach to QFStomach + (55 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Strawberry" refObj)				set QFStomach to QFStomach + (55 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Watermelon" refObj)				set QFStomach to QFStomach + (55 * (GetWeight refObj) / baseWeight)			;known vegetables			elseif (NameIncludes "Carrot" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Corn" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Green Stain Cup Cap" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Leek" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Lettuce" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Onion" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Potato" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Pumpkin" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Radish" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Tobacco" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Tomato" refObj)				set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)			;known grains			elseif (NameIncludes "Bread Loaf" refObj)				set QFStomach to QFStomach + (367 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Fennel Seeds" refObj)				set QFStomach to QFStomach + (367 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Flour" refObj)				set QFStomach to QFStomach + (367 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Rice" refObj)				set QFStomach to QFStomach + (367 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Sweetcake" refObj)				set QFStomach to QFStomach + (367 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Sweetroll" refObj)				set QFStomach to QFStomach + (367 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Wheatgrain" refObj)				set QFStomach to QFStomach + (367 * (GetWeight refObj) / baseWeight)			;known cheeses			elseif (NameIncludes "Cheese" refObj)				set QFStomach to QFStomach + (330 * (GetWeight refObj) / baseWeight)			;odd meat cases			elseif (NameIncludes "Beef" refObj)				set QFStomach to QFStomach + (191 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Meat" refObj)				set QFStomach to QFStomach + (191 * (GetWeight refObj) / baseWeight)			elseif (NameIncludes "Ham" refObj)				set QFStomach to QFStomach + (191 * (GetWeight refObj) / baseWeight)			;unknown foods			else				set QFStomach to QFStomach + (55 * (GetWeight refObj) / baseWeight)			endif		elseif effectCode == REHECode			set QFStomach to QFStomach + (191 * (GetWeight refObj) / baseWeight)		else			set QFStomach to QFStomach + (73 * (GetWeight refObj) / baseWeight)		endif		if QFStomach >= maxStomach			set QFStomach to maxStomach			Message "You are full."		endif	endifendifEnd


The problem is, I can't save the code after inserting. In fact, I can't even save the code after opening it and doing nothing. It just says:

Script 'QFNatHun2EatScript', line 34:Script command 'Label' not found'.


If there is an error in the code, how is it running in game? And how can I get it to save?
User avatar
victoria gillis
 
Posts: 3329
Joined: Wed Jan 10, 2007 7:50 pm

Post » Sat Feb 19, 2011 8:45 am

"Label" is an (old, and pretty obsolete) OBSE command, so you must invoke the OBSE editor to be able to edit and save this script.
User avatar
Lavender Brown
 
Posts: 3448
Joined: Tue Jul 25, 2006 9:37 am

Post » Sat Feb 19, 2011 3:28 am

Oh, I didn't realize that it used OBSE. I'll do that then, thanks. I don't know anything about OBSE commands, so I won't mess with stuff I don't have to, even if it is obsolete.
"Label" is an (old, and pretty obsolete) OBSE command, so you must invoke the OBSE editor to be able to edit and save this script.

User avatar
AnDres MeZa
 
Posts: 3349
Joined: Thu Aug 16, 2007 1:39 pm


Return to IV - Oblivion