Getting int from a string a quite wierd

Discussion in 'Plugin Development' started by wydgabriel, May 15, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    wydgabriel

    Hello guys.
    I'm trying to make a method to get a int from the string (''DMG: <int>/<int2>")
    How do I get int 1 and int2?
     
  2. Is this in a config file or are you trying to parse it from a regular string?
     
  3. Offline

    wydgabriel

    Regular string, from a lore index :)
     
  4. Offline

    Zombie_Striker

    @wydgabriel
    What you want to do is replace "DMG: " with "" (or nothing). Then, take that new string and split it at "/". The first argument will be 'int' and the second will be 'int2'
     
Thread Status:
Not open for further replies.

Share This Page