Author |
Topic  |
|
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 10 December 2003 : 17:31:10
|
quote: Error Type: Microsoft VBScript compilation (0x800A03F6) Expected 'End' /BG/forums/Admin_Games_update_handler.asp, line 356
Whenever I see this error I assume there is an "end if" missing. However, even after I simply add "end ifs" to the bottom of the file it keeps asking for more! quote:
my_Conn.close set my_Conn = Nothing
end if end if end if end if %>
Now I know that I can't have left so many if statements unclosed - could this error msg mean something else? |
Alfred The Battle Group CREDO
|
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 10 December 2003 : 18:18:58
|
Hey Alfred (long time no see, I was beginning to worry !!)
End could mean a few things - End function, End If, etc...
Check your code, make sure it's properly indented, and the problem usually appears. |
 |
|
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 10 December 2003 : 21:04:30
|
Hi Laser! Not hearing of me in a while is a good sign - it means I am getting thigs done on my own. 
However, this one is puzzling me, and I have to check for unclosed functions now. If I just end function without knowing, may it be ok? |
Alfred The Battle Group CREDO
|
 |
|
Alfred
Senior Member
   
USA
1527 Posts |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 10 December 2003 : 21:43:37
|
I think I found your problem ... you are using "else if" rather then "ElseIf" (note, the second one doesn't have a space). So remove the spaces wherever you have them between the two.
Also, I think you should delete lines 230 & 231 - I think you just shoved them in there to work it work ? not needed. |
 |
|
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 10 December 2003 : 22:13:36
|
Yes, that must have been it! Because when I cleaned it up it now works.
That logic is pretty hard to grasp: it's end if, but elseif.
Thanks Laser!  |
Alfred The Battle Group CREDO
|
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 10 December 2003 : 22:48:02
|
Not hard at all really The End command can be used for a variety of End's, whereas the ElseIf is an optional section within the If.
Personally, I rarely use ElseIf because the syntax changes in almost every language.
To blur the lines a bit more, you could use "Else If" if you close the second If within the Else as in ...
If .... Then
blah
Else
If
....
End If
End If
If you use ElseIf then you only need one End If. |
 |
|
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 10 December 2003 : 23:12:34
|
Oh, wonderful!  One more thing - can you spot the error here: quote: memID = request.form("honoredPlayer") medalID = request.form("medalType") medalScen = request.form("medalScen")
strSql = "INSERT INTO member_medals " &_ "(member_ID, medal_ID, Scenario) VALUES (" & memID & ", " & medalID & "," & MedalScen & ")" my_Conn.execute(strSql)
quote: Syntax error (missing operator) in query expression 'Pursuit to Tobruk'. /BG/forums/Admin_medals_Add_handler.asp, line 23
|
Alfred The Battle Group CREDO
|
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
|
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 10 December 2003 : 23:55:31
|
Aha! The first two are numeric, but the third is a text field. Thanks for the pointer! |
Alfred The Battle Group CREDO
|
 |
|
|
Topic  |
|