RobotStudio event

Messaging domain problem, "string" != "string"

The error basically says that "string" != "string" - which makes me wonder what is going on Cry

image

Comments


  • I just altered the code to use "num" as the datatype and it works when altering the datatype in the IRC5 code to num...


    C# looks like this ( the commented s definition works )

    string s = "string;"+ value; //value is of type string
    //string s = "num;1";  //Tx of numbers works
    msg.SetData(new System.Text.UTF8Encoding().GetBytes(s));
    msg.UserDef = ID;
    msg.Sender = ipcQueue_ToRAP.QueueId;
    ipcQueue_ToRAP.Send(msg);

    Laro882009-11-10 13:20:56
  • Problem solved, misleading error message Confused

    Strings must be wrapped in " so the string to be send should look like this:

    string s = "string;""+ value+""";


    The string != string error is misleading, it should say something like

    "illegal string wrapping or termination"



     




  • Can't understand how to send strings via RMQ messaging. I can send only like this, but I need to send different strings:

    Byte[] data = new UTF8Encoding().GetBytes("string;\"hello world\"");

    Laro88 said:
    Problem solved, misleading error message Confused

    Strings must be wrapped in " so the string to be send should look like this:

    string s = "string;""+ value+"""; 

    For me it doesn't work.




  • DenisFR
    DenisFR ✭✭✭
    Hello,
    You don't escape well ".
    You're near on comments:
    Byte[] data = new UTF8Encoding().GetBytes("string;\"" + strMsg + "\"");
    This create a string = (string;"Your Message").