Announcement

Collapse
No announcement yet.

Compare two version

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Compare two version

    OK I have asked this in the past and unable to find the post not sure if I was using the wrong search requests or what but here goes.

    I have two version numbers in the form 0.0.0.0 AMS does not accept this as a number so I have to '0.0.0.0' but how do I compare the two versions, one version is coming from a XML file

    I have tired to see if there the same and also tried tonumber but there not working, where am I going wrong lol version checking be a easy task but guess I just don't have a brain for each lol


    Ub.Version = '0.0.0.0';
    local MVersion = XML.GetValue("Software/Version");

    Ub.Version >= MVersion, (Nope)
    tonumber(Ub.Version) >= tonumber(MVersion) (nil)

    I also played with someones decimals.apz and 2.0.0.1 and 1.0.0.0 both return please use possative numbers so I have no idea lol
    Plugins or Sources MokoX
    BunnyHop Here

  • #2
    After digging and digging I was able to find another topic using simpler problem and for anyone that might read this the problem is fixed by using String.CompareFileVersions

    Thanks for reading.
    Plugins or Sources MokoX
    BunnyHop Here

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎