初学Vbsscript,写了个函数碰见了类型不匹配求解

Princesk 2021-03-19 10:43:10
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上的,但是函数传参就说类型不匹配怎么回事啊?
...全文
4115 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Princesk 2021-03-19
  • 打赏
  • 举报
回复
Line#1 :类型不匹配‘[string:"check_error"]’这个是错误信息

1,324

社区成员

发帖
与我相关
我的任务
社区描述
主要是开发驱动技术
社区管理员
  • 驱动程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧