playMaker

Author Topic: Convert String to Int from UDP  (Read 1628 times)

Kothe

  • Junior Playmaker
  • **
  • Posts: 71
Convert String to Int from UDP
« on: October 27, 2016, 08:00:36 PM »
Hi.
I am working with strings from UDP. I get them in Unity and works so fine.
The issue is that when I try to convert the strings to Ints give me this error:

FormatException: Input string was not in the correct format
System.Int32.Parse (System.String s) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int32.cs:629)

The strings I receive from the UDP are ASCII.

Why I cant convert them to Int ?

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Convert String to Int from UDP
« Reply #1 on: November 01, 2016, 02:53:47 AM »
Hi,

 can you give me a sample of this string input? I'll have a go.

Bye,

 Jean