Skype问题有多个参数

时间:2014-11-15 02:38:19

标签: c# skype skype4com

我正在尝试创建一个C#Stress脚本,但它一直给我错误:Error Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement.

代码:

using System;
using System.Collections.Generic;
using System.Text;
using Skyper;
using SKYPE4COMLib;
using System.Net;
namespace Skyper.plugins
{
public static class Help
{
    public static string Description
    {
        get 
        {
            return "Stresser";
        }
    }
    public static void Execute(string[] Params, int chat, string username)
    {


        Skyper.SendMessage(chat, Params[1] + "" + new WebClient().DownloadString("http://example.com/stresser/api.php?key=examplekey&host=" + Params[1]));"&port=&time=&method=";

    }
}
}

此脚本的工作原理是Skype中的用户将输入!stress ip, port, time, method,然后将其提交给API。

1 个答案:

答案 0 :(得分:2)

以下是一个简单的字符串,未分配给任何东西,

"&port=&time=&method=";

所以你可以使用类似的东西:

Skyper.SendMessage(chat, Params[1] + "" + new WebClient().DownloadString("http://example.com/stresser/api.php?key=examplekey&host=&port=&time=&method=" + Params[1])");

或使用双引号和括号结束符号正确更改该字符串