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?