visual studio soccer application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hekje87
    Junior Member
    • Sep 2015
    • 2

    #1

    visual studio soccer application

    Hi all,

    I'm trying to make a betfair soccer application for displaying the plays of the day with the odds next to it with Visual studio. I have a problem with displaying the full game name (for example England U23 (W) v Germany U20 (W)). In my application only the first part of the game is shown (England) and i don't know how to get the full name displayed.

    the json response is;

    [{"jsonrpc":"2.0","result":[{"marketId":"1.123361607","marketName":"First Half Goals 0.5","marketStartTime":"2016-03-02T12:00:00.000Z","totalMatched":1093.7835,"event" :{"id":"27708936","name":"England U23 (W) v Germany U20 (W)","timezone":"Europe/London","openDate":"2016-03-02T12:00:00.000Z"}}

    and i try to get the name with;
    Public Class [Event]
    Public name As String
    Public timezone As String
    Public openDate As String
    End Class

    and try to display it with;

    For n = 0 To allMarkets(0).result.Count - 1

    Dim name As String()
    name = Split(allMarkets(0).result(n).event.name)
    Print(Format(allMarkets(0).result(n).marketStartTi me,"Short Time") & " " & name(0))

    i hope that someone can help me with it.
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #2
    You appear to be splitting the name into individual components and then only printing the first component.

    What is the purpose of:

    name = Split(allMarkets(0).result(n).event.name)

    If you just want the name, then can't you just use:

    name = allMarkets(0).result(n).event.name

    Comment

    • hekje87
      Junior Member
      • Sep 2015
      • 2

      #3
      Thanks for the reply!

      When i removed the split part i got an error so I didn't knew how to fix it. But now I removed it and made an alterration in the string and now it's working! I removed the () after Dim name As String()

      sorry I'm a beginner in programming and don't know the use of all the characters of the programming language, but I'm learning!

      Thanks

      Comment

      Working...
      X