H
Henry
Hi,
I need to pass an array to a function, change it a little and return it to
the main code. When i try it the webpage is displayed up until the function
call. Nothing after that is displayed. When debugging in VS 6 it says: "An
exception of type 'Error in Microsoft VBScript: Incompatible types' was not
handled".
'Main code
'-----------------------------------------------------
dim list(8)
dim newlist(8)
Randomize
For counter = 0 To 4
list(counter) = Int(Rnd * 21)
Response.Write list(counter) & ", "
Next
Response.Write "<br>"
newlist = listFunction(list)
For counter = 0 To 4
Response.Write newlist(counter) & ", "
Next
'function
'-----------------------------------------------------
Function listFunction(list)
dim tmplist(8)
Randomize
For k = 0 To 4
tmplist(k) = list(k)*2
Next
listFunction = tmplist
End Function
Also, when reloading the page i sometimes get the message 'A RPC (Remote
Procedure Call) was not executed' (the message is translated from swedish by
me). Does anyone know what i am doing wrong? Any help is welcome.
/H
I need to pass an array to a function, change it a little and return it to
the main code. When i try it the webpage is displayed up until the function
call. Nothing after that is displayed. When debugging in VS 6 it says: "An
exception of type 'Error in Microsoft VBScript: Incompatible types' was not
handled".
'Main code
'-----------------------------------------------------
dim list(8)
dim newlist(8)
Randomize
For counter = 0 To 4
list(counter) = Int(Rnd * 21)
Response.Write list(counter) & ", "
Next
Response.Write "<br>"
newlist = listFunction(list)
For counter = 0 To 4
Response.Write newlist(counter) & ", "
Next
'function
'-----------------------------------------------------
Function listFunction(list)
dim tmplist(8)
Randomize
For k = 0 To 4
tmplist(k) = list(k)*2
Next
listFunction = tmplist
End Function
Also, when reloading the page i sometimes get the message 'A RPC (Remote
Procedure Call) was not executed' (the message is translated from swedish by
me). Does anyone know what i am doing wrong? Any help is welcome.
/H