Skype issue with multiple params

117 views Asked by At

I am trying to make a C# Stress script but it keeps giving me the error: Error Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement.

Code:

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=";

    }
}
}

How this script will work is users in Skype will type in !stress ip, port, time, method and then it will submit it to the API.

1

There are 1 answers

0
Usman Waheed On BEST ANSWER

Following is a simple string, which is not assigned to any thing,

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

So may be you can use something like:

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

or change that string properly with double quotes and brackets end symbols