Forums » Advanced Editor Forum » Read Thread

Talk about it. Ask for help on it. Compliment it.

Problem with $ITEMSTATE

8 years ago

In my story I want a certain item to appear in the players inventory after clicking on a link. I attached the Script below.


But when I click on the link in the Story Viewer this comes up:


Server Error in '/' Application.

PostProcessed already!

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: PostProcessed already!

Source Error:

Line 34: 			case "FollowLink":
Line 35: 				{
Line 36: 					StoryStateReturnValues ret = State.FollowLink(int.Parse(Request.Form["pbValue"]));
Line 37: 					switch (ret)
Line 38: 					{

Source File: c:\Websites\ChooseYourStory\\Story\Viewer\Default.aspx    Line: 36

Stack Trace:

[Exception: PostProcessed already!]
   ChooseYourStory.Stories.StoryState.PostProcess() in c:\BuildMasterAgent\_AGTTMP\_A4\_S11\SRC\ChooseYourStory\Stories\StoryState_PostProcess.cs:184
   ChooseYourStory.Stories.StoryState.FollowLink(Int32 linkId) in c:\BuildMasterAgent\_AGTTMP\_A4\_S11\SRC\ChooseYourStory\Stories\StoryState_PublicInterface.cs:258
   ASP.story_viewer_default_aspx.OnLoad(EventArgs e) in c:\Websites\ChooseYourStory\\Story\Viewer\Default.aspx:36
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


I tried pasting the script onto the page script instead and it worked just fine. But for the thing I'm doing I want the item to appear when you click the link, not when you arrive at the page. Is there something I'm doing wrong?

Problem with $ITEMSTATE

8 years ago

Probably not. This was an old bug that eventually got fixed.

Could be that the bug has returned - which will force you to have to work around it  :(

Problem with $ITEMSTATE

8 years ago

I suppose I could work around, it would just mean a bit more work.