help with vbscript code

csamuels

Junior Member
Dec 3, 2004
6
0
0
i got this code to check if a user set only one of three values. With this code as is i get Line:18 Col:0 Expected 'End' Syntax Error:. I think its telling me to change my first else to a end if. when i change all my else's to end if's then i get the following error Line:18 Col:4 Expected 'Function' Syntax Error:.

i=0

if SEND_TO = NC then
i=i+1
end if

if UW_USERID = NC then
i=i+1
end if

if GOTO_AUTH = NC then
i=i+1
end if

if i = 0 then GETTRUEFALSE = FALSE
else
if i < 2 then GETTRUEFALSE = TRUE
else
if i = 3 then GETTRUEFALSE = FALSE
end if
 
Nov 7, 2000
16,403
3
81
you need an end if for every if

so.. add 2 more

if i = 0 then GETTRUEFALSE = FALSE
else
if i < 2 then GETTRUEFALSE = TRUE
else
if i = 3 then GETTRUEFALSE = FALSE
end if
end if
end if

thats all i see right now