Announcement

Collapse
No announcement yet.

Problem with strcmp and EVAL

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

  • Problem with strcmp and EVAL

    so every time i use the EVAL;variable;strcmp("$var1$";"$var2$") function, it returns 0 to the variable no matter what var1 and var2 are

    even this:
    Code:
    "EVAL;RESULT;strcmp("4";"4")"
    returns 0 and it is supposed to be 1. is this a bug, or what can be done to fix this

  • #2
    You have the syntax correct, but use "strcomp" instead

    This is right from the SkinCommands.txt:

    "EVAL;RESULT;strcomp("$VAR1$";"$VAR2$")" (If VAR1 and VAR2 are equal result is set with 1, otherwise 0)
    Last edited by JohnWPB; 02-13-2011, 12:24 AM.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

    Comment


    • #3
      or use IFVAR, specially if you want to do something based on the result, vs setting a VAR

      IFVAR;myvar=4;truething<<falsething

      IFVAR;myvar=hello;truecommand<<falsecommand
      -Thanks
      Mitch
      www.rush2112.net

      "Did you test it in carwings??"

      Sun, Come shine my way
      May healing waters bury all my pain
      Wind, Carry me home
      The fabric of reality is tearing apart
      The piece of me that died
      Will return To live again

      Comment


      • #4
        answers worked perfectly for me. thank you!

        Comment

        Working...
        X