为什么我在循环时收到错误消息 [英] Why do i get error message when i loop

查看:40
本文介绍了为什么我在循环时收到错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

' the loop statement 
do while messagessent < messages submitted 
    messagessent = messagesent + 1
    Dim client  = New RestClient("https://api.infobip.com/sms/1/text/multi")

    foneno = trim(foneno.Replace(",",""","""))

    Dim request = New RestRequest(Method.POST)
    request.AddHeader("accept", "application/json")
    request.AddHeader("content-type", "application/json")
    request.AddHeader("authorization", "Basic NutrtryoYW5nZW1lMUE=") 'base64   of usename and password
    request.AddParameter("application/json","{""messages"":[{""from"":""" +  senderid + """,""to"":["""& mobileno &""" ],""text"":""" + message + """}]}",ParameterType.RequestBody)

    Dim eresponse As IRestResponse = client.Execute(request)
loop

推荐答案

我不确定代码还有哪些其他问题,但从我在这里看到的情况来看,您有两个明显的错误.

I'm not sure what other issues the code has but from what i can see here you have two obvious errors.

  1. 循环条件语句使用变量 messages submit 我怀疑这是有效的.
  2. 您正在处理一个变量 foneno 并在它下面的代码中使用不同的变量 mobileno.显然,这 2 个中的一个尚未声明.
  1. The loop conditional statement uses a variable messages submitted i doubt this is valid.
  2. You are processing a variable foneno and using a different one in the code below it mobileno. obviously one of these 2 haven't been declared.

这篇关于为什么我在循环时收到错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆