Ir para conteúdo
Fórum Script Brasil
  • 0

Erro De Programação


portalsnol

Pergunta

Gostaria de saber se alguém poderia me ajudar a encontrar o erro em uma página, pois já tentei de várias maneiras e não consigo detectar o erro.

Erro:

Erro de tempo de execução do Microsoft VBScript erro '800a000d'

Tipos incompatíveis: 'CInt'

/webmail/inbox.asp, line 203

Link para o comentário
Compartilhar em outros sites

11 respostass a esta questão

Posts Recomendados

  • 0

Brother!!!

Exiba seu código para poder ajudar-mos. Normalmente, isso acontece, quando tentamos converter um tipo de dados e não esta de acordo com o tipo do conversor..

Ex: de texto para numero;

Nome = "urso"

Nome = CInt(Nome)

Gera a mesma mensagem de erro.. que você esta recebendo

Link para o comentário
Compartilhar em outros sites

  • 0

<%

Sub WriteJSFunctions()

Comment "BEGIN: JavaScript Functions"

Response.Write "<script language=JavaScript>" & vbCrLf

Response.Write "function checkCheckboxes() {" & vbCrLf

Response.Write "var docForm=document.inboxForm;" & vbCrLf

Response.Write "var len = docForm.elements.length;" & vbCrLf

Response.Write "for( var i=0 ; i<len ; i++) {" & vbCrLf

Response.Write "if (docForm.elements.name == 'delCheck') {" & vbCrLf

Response.Write "if (docForm.elements.checked != '')" & vbCrLf

Response.Write "return true;" & vbCrLf

Response.Write "}" & vbCrLf

Response.Write "}" & vbCrLf

Response.Write "return false;" & vbCrLf

Response.Write "}" & vbCrLf

Response.Write "function confirmDelete() {" & vbCrLf

Response.Write "if ( !checkCheckboxes() ) {" & vbCrLf

Response.Write "alert('Você não selecionou nenhuma mensagem!');" & vbCrLf

Response.Write "return false;" & vbCrLf

Response.Write "}" & vbCrLf

Response.Write "if ( confirm( ""Você tem certeza que quer excluir as mensagens selecionadas?"" ) ) {"

Response.Write "document.inboxForm.submit();" & vbCrLf

Response.Write "}" & vbCrLf

Response.Write "return false;" & vbCrLf

Response.Write "}" & vbCrLf

Response.Write "function showMessage( ID ) {" & vbCrLf

Response.Write "window.location.href = ""message.asp?ID=""+ID" & vbCrLf

Response.Write "return false;" & vbCrLf

Response.Write "}" & vbCrLf

Response.Write "</SCRIPT>" & vbCrLf

End Sub

%>

<%

Sub POPToFile(POPType)

Dim doPartialPOP

doPartialPOP = 0

If POPType = "partial" Then

doPartialPOP = CInt(messagesPerPage)

End If

Session("POPPEDALL") = ""

Dim FSO

Set FSO = server.CreateObject ("Scripting.FileSystemObject")

If FSO.FolderExists( usersPhysicalPath ) = False Then

dim fa

set fa=FSO.CreateFolder( usersPhysicalPath )

set fa=nothing

End If

Set foPOPFile = FSO.CreateTextFile(userFileName, true)

forAppending = 8

If fso.FileExists(userTempFileName) = True AND POPType <> "complete" Then

Set foUserTempFile = FSO.OpentextFile(userTempFileName, forAppending)

Else

Set foUserTempFile = FSO.CreateTextFile(userTempFileName, true)

End If

Set pop3 = Server.CreateObject("JMail.POP3")

On Error Resume Next

pop3.Connect MyUsername, MyPassword, POP3Server

If Err <> 0 Then

Session("ATTACHMENTS") = ""

Session("USERNAME") = ""

Session("PASSWORD") = ""

Session("MAILACCESS") = ""

Session("CURRENTPAGE") = ""

Session("POPPEDALL") = ""

Response.redirect "login.asp?error=1"

End If

pop3Count = pop3.Count

If pop3Count <= messagesPerPage Then

doPartialPOP = 0

End If

If doPartialPOP > 0 Then

If Request.QueryString("PG") = "" Then

thisPage = 0

Else

thisPage = Request.QueryString("PG")

End If

startMsg = (thisPage * messagesPerPage) + 1

endMsg = startMsg + messagesPerPage - 1

If endMsg > pop3Count Then

endMsg = pop3Count

End If

Else

startMsg = 1

endMsg = pop3Count

End If

foPOPFile.writeLine(pop3Count)

if pop3Count > 0 then

For j = startMsg To endMsg

strPOPItem = ""

messageID = pop3Count + 1 - j

strPOPItem = strPOPItem & messageID

Set msg = pop3.Messages.item(messageID)

strReplyFrom = ""

ReTo = ""

ReCC = ""

Set Recipients = msg.Recipients

separator = ", "

For i = 0 To Recipients.Count - 1

If i = Recipients.Count - 1 Then

separator = ""

End If

Set re = Recipients.item(i)

If re.ReType = 0 Then

ReTo = ReTo & re.EMail & separator

If (strReplyFrom = "") AND (GetFromAddress(re.EMail) <> "") Then

strReplyFrom = re.EMail

End If

else

ReCC = ReCC & re.EMail & separator

If (strReplyFrom = "") AND (GetFromAddress(re.EMail) <> "") Then

strReplyFrom = re.EMail

End If

End If

Next

strPOPItem = strPOPItem & msgTOKEN & msg.From

Set Attachment = msg.Attachments

If Attachment.Count > 0 Then

strPOPItem = strPOPItem & msgTOKEN & 1

Else

strPOPItem = strPOPItem & msgTOKEN & 0

End If

strPOPItem = strPOPItem & msgTOKEN & DateToNumber(msg.Date) & "." & msg.From

If msg.Subject <> "" Then

strPOPItem = strPOPItem & msgTOKEN & msg.Subject

Else

strPOPItem = strPOPItem & msgTOKEN & "(sem assunto)"

End If

strPOPItem = strPOPItem & msgTOKEN & Left(msg.Date, 10)

strPOPItem = strPOPItem & msgTOKEN & strReplyFrom

foPOPFile.writeLine(strPOPItem)

foUserTempFile.writeLine(strPOPItem)

Next 'For j = startMsg To endMsg

End if ' If popCount > 0

foPOPFile.close

foUserTempFile.close

set foPOPFile = nothing

set foUserTempFile = nothing

pop3.Disconnect

Set FSO = nothing

If doPartialPOP > 0 Then

Session("POPPEDALL") = ""

Else

Session("POPPEDALL") = "yes"

End If

End Sub

Sub DisplayPOPHeaders()

Dim arrPOPArray

arrPOPArray = fileToArray(userFileName)

pop3Count = CInt (arrPOPArray(0)) "LINHA DO ERRO"

If VarType(arrPOPArray) <> 0 AND UBound(arrPOPArray) > 0 Then

If Request.QueryString("PG") = "" Then

thisPage = 0

Else

thisPage = Request.QueryString("PG")

End If

startMsg = (thisPage * messagesPerPage) + 1

endMsg = startMsg + messagesPerPage - 1

If endMsg > pop3Count Then

endMsg = pop3Count

End If

Comment "BEGIN: draw main page table"

Link para o comentário
Compartilhar em outros sites

  • 0
pop3Count = CInt (arrPOPArray(0))

Vou tentar ajudar...

pop3Count = arrPOPArray(0)

Veja se dá certo..

Cara não funcionou, já tentei de tudo quanto foi forma e nada.

Brother, diga lá, o erro continua o mesmo ?

agora para mim nem abre a página, tenta ver se abre ae.

http://webmail.portalsnol.com

e-mail: teste@portalsnol.com

senha: teste

Link para o comentário
Compartilhar em outros sites

  • 0
pop3Count = CInt (arrPOPArray(0))

Vou tentar ajudar...

pop3Count = arrPOPArray(0)
Veja se dá certo..
Cara não funcionou, já tentei de tudo quanto foi forma e nada.
Brother, diga lá, o erro continua o mesmo ?
agora para mim nem abre a página, tenta ver se abre ae. http://webmail.portalsnol.com e-mail: teste@portalsnol.com senha: teste
Erro de compilação do Microsoft VBScript erro '800a0401' Fim da instrução esperado /webmail/inbox.asp, line 203 pop3Count = CInt arrPOPArray(0) -----------------^
Altere para:
pop3Count = CInt(arrPOPArray(0))

Link para o comentário
Compartilhar em outros sites

  • 0
pop3Count = CInt (arrPOPArray(0))

Vou tentar ajudar...

pop3Count = arrPOPArray(0)
Veja se dá certo..
Cara não funcionou, já tentei de tudo quanto foi forma e nada.
Brother, diga lá, o erro continua o mesmo ?
agora para mim nem abre a página, tenta ver se abre ae. http://webmail.portalsnol.com e-mail: teste@portalsnol.com senha: teste
Erro de compilação do Microsoft VBScript erro '800a0401' Fim da instrução esperado /webmail/inbox.asp, line 203 pop3Count = CInt arrPOPArray(0) -----------------^
Altere para:
pop3Count = CInt(arrPOPArray(0))

já foi alterado

Link para o comentário
Compartilhar em outros sites

  • 0

já foi alterado

huh.gif

Eu estou com uma dúvida sobre este código... Principalmente sobre "FileToArray".

Eu, estou dizendo particularmente, nunca usei ou ouvi falar sobre isto, nem VB eu aprendi isso.

Se for para separar em um Array os dados, EU, uso Split(Variavel,"delimitador").

Dei uma busca por 'FileToArray' e achei a seguinte instrução no site:

Achado isso em C#

DataTable dt = ArrayToDataTable(FileToArray(@"C:\misc\xyz.txt"), new char[1]{','}, true);

Mas não entendi Bolunfas...... ohmy.gif

Acho que no seu caso, pelo que me parece, uma solução seria usar split() já que o mesmo precisa transformar inteiro o indice(0) da sua Matriz... peço até ajuda aos universitários de plantão pois não estou conseguindo desvendar este tipo de problema.

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152k
    • Posts
      651,8k
×
×
  • Criar Novo...