Jump to content

Checking That Variables Are Defined


Striped Fish2
 Share

Recommended Posts

I have a very complicated check for my game designed to see if the session for whether the quest tracker is hidden or not is defined or undefined. Then if you want to change it you have a querystring that you add to the URL to tell it to update the Session to the value you put in the querystring. Here is my code that I crafted up to do this, the issue is I get a syntax error and I am not sure of any other way to do this:

<%'This is an include page that defines variables and common functions that will be used on every page.'This page was created by Glorfindel on October 27, 2011'define the user variableuser=Session("usernamechar")If IsEmpty(request.querystring("showtracker")) AND Session("showtracker") Is <> Nothing thenshowtracker = Session("showtracker")ElseIf IsEmpty(request.querystring("showtracker")) AND IsEmpty(Session("showtracker")) thensession("showtracker") = "true"ElseIf request.querystring("showtracker") Is <> Nothing AND Session("showtracker") Is <> Nothing thenIf request.querystring("showtracker") = "true" thensession("showtracker") = "ddddd"ElseIf request.querystring("showtracker") = "false" thensession("showtracker") = "false"End IfEnd Ifshowtracker = session("showtracker")%>

Here is the error:

Microsoft VBScript compilation 800a03eaSyntax error/DragonCraft/includes/common.asp8If IsEmpty(request.querystring("showtracker")) AND Session("showtracker") Is <> Nothing then -----------------------------------------------------------------------------^[/Quote]
Link to comment
Share on other sites

  • 9 months later...

Microsoft VBScript compilation 800a03eaSyntax error/DragonCraft/includes/common.asp8If IsEmpty(request.querystring("showtracker")) AND Session("showtracker") Is <> Nothing then -----------------------------------------------------------------------------^ The above Error contains "is" as operator. But in Classic asp there is no "is" operator statment remove is from your code...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...