This is the script I am using:
Scriptname BCQScript1 extends Quest ConditionalIngredient Property pSugar Auto ConditionalGlobalVariable Property pBCQ01SugarCount Auto ConditionalQuest Property pBCQ01Quest Auto ConditionalFunction SugarCounted()int CurrentCount = Game.GetPlayer().GetItemCount(pSugar)pBCQ01SugarCount.Value = http://forums.bethsoft.com/topic/1348543-quest-scripting-woes-cant-make-my-function-work/CurrentCountUpdateCurrentInstanceGlobal(pBCQ01SugarCount)if CurrentCount>= 1 pBCQ01Quest.SetObjectiveCompleted(10,1) pBCQ01Quest.SetObjectiveDisplayed(20,true,true)elseif CurrentCount < 1 pBCQ01Quest.SetObjectiveCompleted(10,0) pBCQ01Quest.SetObjectiveDisplayed(20,0) pBCQ01Quest.SetObjectiveDisplayed(10,true,true)endifendFunction
It saves and compiles fine, no warnings or errors.
Now, I got to quest stage 10 and try to add as a fragment, pBCQ01Quest.SugarCounted()
Result:
Starting 1 compile threads for 1 files...
Compiling "QF_BCQ01_01004F93"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_BCQ01_01004F93.psc(12,12): SugarCounted is not a function or does not exist
No output generated for QF_BCQ01_01004F93, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on QF_BCQ01_01004F93
Compiling "QF_BCQ01_01004F93"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_BCQ01_01004F93.psc(12,12): SugarCounted is not a function or does not exist
No output generated for QF_BCQ01_01004F93, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on QF_BCQ01_01004F93
I don't understand

