初学Vbsscript,写了个函数碰见了类型不匹配求解
Function error (count0)
xsh.Screen.Send("check_error:" + count0)
xsh.Screen.Send(VbCr)
xsh.Dialog.MsgBox("reboot:" +count)
xsh.Dialog.MsgBox("check route")
End Function
Sub Main
dim j:j=2
error(j)
xsh.Screen.Send(" route -ne ")
End Sub
' Function check2(kjl)
' check(kjl) = 2
' xsh.Screen.Send(" route -ne | grep 0.0.0.0 | wc -l ")
' xsh.Screen.Send(VbCr)
' screenrow = xsh.Screen.CurrentRow
' data = xsh.Screen.Get(screenrow-1,1,screenrow-1,20)
' if CInt(Instr(1,data,"4",1)) = "1" Then
' check(kjl) = 0
' End If
' end function
这个脚本是挂在xshell上的,但是函数传参就说类型不匹配怎么回事啊?