Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Scripting problems!

11 years ago

I do some scripting for one of my links and validate it, no errors noticed. Now I play my game and when I get to that link it says error in line 36! I check for line 36 but I only have 18 lines in the script! I changed a few things that might of caused the problem but whatever I do it just still keeps coming up! Please help!

Scripting problems!

11 years ago

It's not a problem in YOUR script. it's a problem in the website/ webpage's script.

I never used scripts before yet still i encountered some of those "error in line [insert number here]"

Scripting problems!

11 years ago

Why don't you post the error and the script..would be useful

Scripting problems!

11 years ago

OK, here is the script and the error message:

Link script:

%CHANCE1 := 1D4
IF %CHANCE1 = 1 THEN
BEGIN
$ITEMSTATE15 := 1
END
IF %CHANCE1 = 2 THEN
BEGIN
$ITEMSTATE16 := 1
END
IF %CHANCE1 = 3 THEN
BEGIN
$ITEMSTATE17 := 1
END
IF %CHANCE1 = 4 THEN
BEGIN
%GOLD := %GOLD + 300
END

Error message:

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\ChooseYourStory.com\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\ChooseYourStory.com\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.1008

Scripting problems!

11 years ago

Your script is perfect..I guess its a problem with the site. 

Scripting problems!

11 years ago

Are you trying to run that on a link or a page?

We had a problem in the past with changing and Itemstate on a link. It was fixed at one point, but might be broken again. I recomend trying it on a page script just to see it it works.

Not however, that changing it on a page script comes with the following quirks:

1> The Itemstate will show a change immediately going into the page.

2> Variable changes will not show until you exit the page (like the gold thing above).

 

Scripting problems!

11 years ago

If gold doesn't increase on that page it might be a bit of a problem...... Anyway, thanks for the advice. I'll see if I can sort it out now.

Scripting problems!

11 years ago

As i said, I've got the same , the SAME error on storygames where I didn't used variables, scripting or items.

For me, it happened whenever I wrote a big wall of text, edited or changed something to storygame properties while the page of the storygame was still open, then tried to save the page. it didn't save, all text was gone, this page full of error and scripted language appeared.....

So yeah, I always thought it to be a session conflict. If you open a storygame's page, edit something but don't save eyt, then change something in the original page, then save the changes to the page, the changes to the story page contradict a number or something in the internal page's script  and cause an error.

Scripting problems!

11 years ago

So you are basically saying that there is no way to fix it? I have not been able to fix it yet, so maybe your right.

Scripting problems!

11 years ago

Just try to have a amximum of 2 windows open and you'll be fine. And always, after finishing a page, before clicknig "save and close window", first copy it's contents and whatever you think is improtant in a notepad/MS Word DOC.

Scripting problems!

11 years ago

Sometimes a Page will get corrupted on a Save. When that happens, you will see all sorts of wierd errors that only happen on that Page.

To fix that, you need to re-create the Page (make a new one) and then delete the old one. Be sure to remember to tie all the old links into your new page though.

Scripting problems!

11 years ago

Thanks for the help, I'm working on it.....

Scripting problems!

11 years ago

ANOTHER PROBLEM!!! I normally have about 3 or 4 windows open at a time!

Scripting problems!

11 years ago

Have one window opened, with the following tabs; Items, variables, scripts, chapters and pages.

Then have another, different window for every game page you want to edit.

After every edit/ addition, copy what you just created and save.

Refresh the tab twice after making any change in the first window's tabs.

After you finish a page, add every link like this: write link name, create the page on which it should land, then close the landing page's window, then next link etc. When you're done, save, then go to the next page you want to edit and save& close the page you finished.

This way, you'll be 99% sure that errors won't occur again.

Scripting problems!

11 years ago

I've never had a problem with multiple windows open, other than a PC slowdown after about 30.... ;)

Scripting problems!

11 years ago

I had a similar problem with the same error message.

Scripting problems!

11 years ago

Another thought - make sure you do not have a Global Script causing a conflict. If you enter a Global Script and then 'disable' advanced scripting, the global script is still there and active. The only thing you are changing is your ability to access it...