Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2007
    Posts
    287

    Nil Value Problem

    For Example ;

    Code:
    name = INIFile.GetValue("my.ini", "data", "name");
    if name == "1" then
       name = "Mustafa";
    end
    if name == "2" then
       name = "mustafa06";
    end
    Label.SetText("Label1", name);----< Error Nil Value Why?

  2. #2
    Join Date
    Mar 2009
    Location
    -31.9554,115.85859
    Posts
    282
    Could you humor me and try putting brackets around

    name == "2"
    and see if that helps?

  3. #3
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Quote Originally Posted by boku View Post
    Could you humor me and try putting brackets around



    and see if that helps?
    You don't have to put brackets around it. You can but you don't have to. He just needs to check that it is not nil before he starts comparing it to another value.

    Code:
    if name then
       if name == "1" then
          name = "Mustafa";
       end
       if name == "2" then
          name = "mustafa06";
       end
    end
    Dermot

    I am so out of here

Similar Threads

  1. Is there a function or dll for convert a number to Hexadecimal?
    By Esfahan in forum AutoPlay Media Studio 7.5
    Replies: 5
    Last Post: 06-02-2008, 11:31 AM
  2. IF else statement
    By synistics in forum AutoPlay Media Studio 6.0
    Replies: 3
    Last Post: 04-21-2007, 12:33 PM
  3. multiple locations.
    By wasim21k in forum AutoPlay Media Studio 6.0
    Replies: 15
    Last Post: 04-04-2007, 09:43 AM
  4. problem closing a running process..
    By Lucian Cain in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 08-22-2006, 04:17 PM
  5. What's wrong?
    By playmenow in forum AutoPlay Media Studio 6.0
    Replies: 11
    Last Post: 03-04-2006, 07:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts