Author |
Topic |
JohnJohn1186
Junior Member
103 Posts |
Posted - 26 November 2004 : 16:10:31
|
Okay, i dont why i tried to add a poll mod. Im too newb and all. But, I followed the instructions extremely careful and it was going good. Well, after i finished it, this error comes up when i try to access the forum:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/vertical/forum/inc_func_common.asp, line 115
function chkQuoteOk(fString) ^
I must have scripted inc_func_common wrong or something. It was the most confusing one to edit though. |
Edited by - ruirib on 26 November 2004 18:23:04 |
|
JohnJohn1186
Junior Member
103 Posts |
Posted - 26 November 2004 : 16:20:05
|
I thought I'd post the script and see if i did something wrong:
'################################################################################# %> <% '############################################## '## Poll Mod ## '##############################################
function GetVote(pTopic_id) Dim tmpVoted
if strWhoVotes = "members" or (strWhoVotes <> "members" and mLev > 0) then '## Forum SQL - See if user has voted in this poll strSql = "SELECT TOPIC_ID " &_ "FROM " & strTablePrefix & "POLL_VOTES " &_ "WHERE MEMBER_ID = " & MemberID set rsPoll2 = Server.CreateObject("ADODB.Recordset") rsPoll2.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsPoll2.EOF or rsPoll2.BOF then tmpVoted = false else do until rsPoll2.EOF or rsPoll2.BOF if cint(pTopic_id) = cint(rsPoll2("TOPIC_ID")) then tmpVoted = true exit do else tmpVoted = false end if rsPoll2.MoveNext loop end if rsPoll2.close set rsPoll2 = nothing end if if strWhoVotes = "members" then '### Members Only Mode GetVote = tmpVoted else '### Everyone Can Vote Mode if mLev > 0 then '### User is logged in when voting if not(tmpVoted) then cpoll = Request.Cookies(strCookieURL & "poll")("" & Topic_ID & "") if instr(cpoll, Topic_ID) > 0 then GetVote = true else GetVote = false end if else GetVote = true end if else '### User is logged out when voting 'Get the topic id's of the polls the user has already blnVoted in 'from the cookie cpoll = Request.Cookies(strCookieURL & "poll")("" & Topic_ID & "") if instr(cpoll, Topic_ID) > 0 then 'Topic ID of poll is found in users cookie GetVote = true else GetVote = false end if end if end if end function
Sub UpdateVote(pGuest_Vote, pMember_ID, pTopic_ID, pForum_ID, pCat_ID) if strWhoVotes = "members" then '### Members Only Mode '## Insert vote into POLL_VOTES table '############# Poll Mod Update 2.0.4 -> 2.0.5 ############ ' Change strMemberTablePrefix -> strTablePrefix strSql = "INSERT INTO " & strTablePrefix & "POLL_VOTES (GUEST_VOTE, MEMBER_ID, TOPIC_ID, FORUM_ID, CAT_ID)" & _ "VALUES (" & pGuest_Vote & ", " & pMember_ID & ", " & pTopic_ID & ", " & pForum_ID & ", " & pCat_ID & ")" '######################################################### '############################################## '## Post Formatting ## '##############################################
function chkQuoteOk(fString)
(THE ABOVE LINE IS LINE 115) |
|
|
Jorrit787
Average Member
Netherlands
681 Posts |
Posted - 26 November 2004 : 16:27:32
|
You don't have an End Sub for UpdateVote. The script now things you are trying to define a Function within a Sub.
Add the End Sub for UpdateVote, like this:
Sub UpdateVote(pGuest_Vote, pMember_ID, pTopic_ID, pForum_ID, pCat_ID)
if strWhoVotes = "members" then '### Members Only Mode
'## Insert vote into POLL_VOTES table
'############# Poll Mod Update 2.0.4 -> 2.0.5 ############
' Change strMemberTablePrefix -> strTablePrefix
strSql = "INSERT INTO " & strTablePrefix & "POLL_VOTES (GUEST_VOTE, MEMBER_ID, TOPIC_ID, FORUM_ID, CAT_ID)" & _
"VALUES (" & pGuest_Vote & ", " & pMember_ID & ", " & pTopic_ID & ", " & pForum_ID & ", " & pCat_ID & ")"
End Sub
'#########################################################
'##############################################
'## Post Formatting ##
'##############################################
Function chkQuoteOk(fString) |
eXtremeGossip |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 26 November 2004 : 16:32:02
|
And what does this topic have to do with "man"? The title is not to be used to express your emotions, but to describe to the snitz community what your topic is talking about. If you want to express your emotions, use the smiley faces in your post, but don't abuse the title! |
Support Snitz Forums
|
|
|
JohnJohn1186
Junior Member
103 Posts |
Posted - 26 November 2004 : 16:45:18
|
Now this error comes up when I added End sub:
Microsoft VBScript compilation error '800a03f4'
Expected 'If'
/vertical/forum/inc_func_common.asp, line 108
End Sub ----^
|
|
|
Jorrit787
Average Member
Netherlands
681 Posts |
Posted - 26 November 2004 : 16:53:44
|
Now that you mention it, you don't have an End If either...
Make it
End If
End Sub
That should do it |
eXtremeGossip |
|
|
JohnJohn1186
Junior Member
103 Posts |
Posted - 26 November 2004 : 17:02:50
|
Ok thanks, but i got another error:
Microsoft VBScript compilation error '800a03f2'
Expected identifier
/vertical/forum/default.asp, line 305
Response.Write. " <tr>" & vbNewline & _ ----------------^
HERE IS THE CODE:
Response.Write " </tr>" & vbNewline & _ " <tr>" & vbNewline & _ " <td bgcolor=""" & strTableBorderColor & """>" & vbNewline & _ " <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewline ' ################# Poll Mod ##################### ' Remember to remove the &_ code from the end of ' the line above. %><!--#INCLUDE FILE="inc_poll.asp" --><% ' Remember to start the 2nd line below with a ' Response.Write. ' ############################################## Response.Write. " <tr>" & vbNewline & _ |
|
|
Jorrit787
Average Member
Netherlands
681 Posts |
Posted - 26 November 2004 : 17:04:27
|
Delete the dot after the last Response.Write
quote: Response.Write. " <tr>" & vbNewline & _
TIP: If you get an 'Expected ...' error, just put in what the script expects and it should be ok |
eXtremeGossip |
|
|
JohnJohn1186
Junior Member
103 Posts |
Posted - 26 November 2004 : 17:07:21
|
ok thx...my forum is working again...for now ^_^ |
|
|
Jorrit787
Average Member
Netherlands
681 Posts |
Posted - 26 November 2004 : 17:13:43
|
You're welcome It's nice to be able to help people ^.^ |
eXtremeGossip |
|
|
JohnJohn1186
Junior Member
103 Posts |
Posted - 26 November 2004 : 17:26:37
|
Oh boy, everything is working fine as far as my forum, but when i went to "poll configuration" under the admin options I set for the polls to turn on then i clicked update configuation, but it resetted back to off. I tried again and it reset again. Did i load it improperly? |
|
|
Jorrit787
Average Member
Netherlands
681 Posts |
Posted - 26 November 2004 : 17:36:00
|
You mean you set them to 'On', click Submit, but when you go back it's on 'Off' again If that's the case, the value may not be written to your database properly... I don't think I can help you with that though |
eXtremeGossip |
|
|
JohnJohn1186
Junior Member
103 Posts |
Posted - 26 November 2004 : 17:41:30
|
yea thats the problem =( |
|
|
Jezmeister
Senior Member
United Kingdom
1141 Posts |
Posted - 26 November 2004 : 19:35:37
|
check you've made all the changes to config.asp properly. |
|
|
JohnJohn1186
Junior Member
103 Posts |
Posted - 27 November 2004 : 11:29:47
|
Is this right in the config.asp?
Dim SubCount, MySubCount '###################### Poll Mod Variables ####################### Dim strFeaturedPoll, strFPollWindow, strPolls, strFeaturedPollID, strFPollTable, strMaxVotes, strHidePoll, strVResults '################################################################## strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/")) strUniqueID = "Snitz00" |
|
|
Jezmeister
Senior Member
United Kingdom
1141 Posts |
Posted - 27 November 2004 : 18:45:06
|
check with the readme file, the usual cause for it not saving configuration changes is having not edited config.asp properly, if at all. If that's not the problem then i don't have a clue either, sorry! |
|
|
Topic |
|