我该如何摆脱这个错误? [英] How do I get rid of this error?

查看:78
本文介绍了我该如何摆脱这个错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误代码cs0131分配的左侧必须是变量,属性或索引器



代码在C#

代码行如下



SendIrcMessage(:+ userName +!+ userName =@+ userName +。tmi.twitch.tv PRIVMSG #+:+消息;



我尝试过:



我已经尝试了任何东西,因为我是新手编码

error code cs0131 the left hand side of the assignment must be a variable, property or indexer

the code is in C#
the code line is as follows

SendIrcMessage(":" + userName + "!" + userName = "@" + userName + ".tmi.twitch.tv PRIVMSG #" + " :" + message);

What I have tried:

I havnt tried anything yet as I am new to coding

推荐答案

错误是因为你的=符号,也许它应该是+ 或用引号括起来。



如果它应该包含在文本中(即;你想要你的消息;

:FredS!FredS = @ FredS.tmi.twitch.tv PRIVMSG#:我要发送的消息是等等

然后你需要加上引号围绕=标志。将代码更改为以下内容;

The error is because of your "=" sign, maybe it should be a "+" or surrounded by quotes.

If it is supposed to be included in the text (ie; You want the your message to be;
":FredS!FredS=@FredS.tmi.twitch.tv PRIVMSG#:The message that I want to send is blah")
Then you need to include quotes around the "=" sign. Change your code to the below;
SendIrcMessage(":" + userName + "!" + userName + "=@" + userName + ".tmi.twitch.tv PRIVMSG #:" + message);



您编写它的方式是尝试赋值


The way you have written it you are trying to assign the value

"@" + userName + ".tmi.twitch.tv PRIVMSG #:" + message



to


to

":" + userName + "!" + userName





亲切的问候



Kind Regards


这篇关于我该如何摆脱这个错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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