global.asa

D

donald

hi guys,
i got a problem with my global.asa file.
it was working fine with win2000. when i try to access the web pages with xp
pro i get this error message -
Error Type:
Microsoft VBScript compilation (0x800A03F2)
Expected identifier
/dmk/liarsdice/global.asa, line 7, column 4
dim const whosturn=0
---^

its obviously finding the global file ok, but i cant figure out what the
identifier its expecting is. the line thats bringing up the error is the
first in a series of constants declared in the sub application_onstart
section of the global.asa file. is it something to do with xp? an i missing
something really obvious(again :( )

thanks
donald
 
E

Evertjan.

donald wrote on 24 nov 2003 in microsoft.public.inetserver.asp.general:

Never heard of constants in VBscript.

try:

dim whosturn
whosturn = 0


Anyway the name "whosturn" seems to me a variable and not a constant value.
 
R

Ray at

You don't dim a constant. You either dim a variable or just define a
constant.

Dim whosturn
whosturn = 0
'or
Const WHOSTURN = 0

This is the same whether this is W2K or not.

Ray at work
 
D

donald

this is driving me nuts. i can dim "some" variables in the asa file, but not
others. and i cant put then in as "dim const x=whatever", only as "dim x"
the same global.asa file was working fine under win2000. could id be
anything to do with me installing php?
 
R

Ray at

Yes, it was in this thread. Here it is again.


You don't dim a constant. You either dim a variable or just define a
constant.

Dim whosturn
whosturn = 0
'or
Const WHOSTURN = 0

This is the same whether this is W2K or not.

Ray at work
 
D

donald

cheers ray thats working :eek:)
well, at least sort of, its bringing up an error with just one of my
constants now (one called "call") but i figure thats probably cause its a
restricted word or something like that. i'll make a few changes to the code,
that'll sort it.
it was definately working with "dim const x = whatever" on win2000 though. i
tried it earlier today on another machine. no errors with the constant
called "call" either. strange....
 
R

Ray at

donald said:
cheers ray thats working :eek:)
well, at least sort of, its bringing up an error with just one of my
constants now (one called "call") but i figure thats probably cause its a
restricted word or something like that. i'll make a few changes to the code,
that'll sort it.

Yes, exactly, call is a reserved word. Call SubRoutine...
it was definately working with "dim const x = whatever" on win2000 though.

I'll believe that when I see it.
i
tried it earlier today on another machine. no errors with the constant
called "call" either. strange....

I'll also believe that when I see it. :]


Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top