compair string to table ??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • RizlaUK
    Indigo Rose Customer
    • May 2006
    • 5478

    compair string to table ??

    Hi Guys, iv hit another brick wall

    i want the user to enter a string in a input object and compair it to a table that is read from a text file......

    i dont seem to be getting anywhere, any ideas
    Embrace change in your life, you never know, it could all work out for the best
  • Josué Alba
    Forum Member
    • Mar 2005
    • 225

    #2
    well you can't compare tables and strings just like that.

    for example (visual mode)

    ieString = "Hello World"

    ieTable = {"Hello World", "this is me", "etc"}

    to compare string to table you should analyze the content of the table (text file is read by lines. each line is a value inside the table) in the example you should do something like:

    if ieString == ieTable[1] (where the number inside the brakets is the index and begins with 1) do
    whatever
    end

    Comment

    • RizlaUK
      Indigo Rose Customer
      • May 2006
      • 5478

      #3
      lol, i got it, i had it right all along but it wasent working because i uploaded the txt file in binary mode and it got all messed up and was only reading to a 1 line table,

      PHP Code:
          for i,k in regfile do
          
      check String.Compare(getcode,);
              if 
      check ~= 0 then
              failed 
      true
              
      else
              
      result Dialog.Message("Notice""code was right."MB_OKMB_ICONINFORMATIONMB_DEFBUTTON1);
              
      failed false
              end
          end 
      Embrace change in your life, you never know, it could all work out for the best

      Comment

      Working...
      X