Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Posts
    56

    Having Table Troubles... Help Please

    Hi Gang, Long time no talk...

    I'm getting back into creating some app's using autoplay media studio,
    but I'm having an issue for some reason with creating a table. Please
    see my code below:

    Code:
    -- Set up s_url table
    s_url = {};
    
    --Check to see if an error occurred...
    error = Application.GetLastError();
    
    if (error ~= 0) then
    
        Dialog.Message("Error", "1 ".._tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
        
    else
    
      s_ulr.SurfURL1 = Input.GetText("SurfURL1");
      s_ulr.SurfURL2 = Input.GetText("SurfURL2");
      s_ulr.SurfURL3 = Input.GetText("SurfURL3");
         
      set_SurfURLs(
                    _SourceFolder.."\\system\\templates\\urldata.tew",
                    
                    "{surl1}",s_ulr.SurfURL1,
                    "{surl2}",s_ulr.SurfURL2,
                    "{surl3}",s_ulr.SurfURL3,
                    
                    _SourceFolder.."\\system\\urldata.tew"
                  )
    end
    
    --Check to see if an error occurred...
    error = Application.GetLastError();
    if (error ~= 0) then
        Dialog.Message("Error", "2 ".._tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
    else
        Dialog.Message("Notice", "Your Surf URL Settings Have Been Updated!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    end
    This code is in the "On Click" event for a button, but it keeps giving me
    the following error message:

    On Click, line 15: attempt to index global 's_url' (a nil value)

    I have checked and re-checked everything, but I cannot figure out why I'm
    getting this error message. Can someone please explain where I'm going
    wrong here?

    Thanks for any help you guys can offer,
    Patrick

  2. #2
    Join Date
    Jan 2007
    Posts
    56
    GAWD, I feel like an idiot!

    I've been going 'round 'n 'round with this thing for
    hours now, and I just found out what the issue is...

    I have my created table: s_url

    ..and then I have this table (never created): s_ulr
    trying to add data to a table that was never created in
    the first place!

    ha ha

    Sorry for the stupid post,
    Patrick

  3. #3
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    lol .. i guess we've all done things like that!
    One reason why it's good to copy/paste table names, variables etc.
    Can save .. hours! of time
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  4. #4
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by Derek View Post
    lol .. i guess we've all done things like that!
    One reason why it's good to copy/paste table names, variables etc.
    Can save .. hours! of time
    Erm... and.. days?

    Big source + 3 char longh variable name (faulty ofcourse)... I wasn't really happy at that time xD...
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

Similar Threads

  1. Fading effect with Labels
    By autoplmst6 in forum AutoPlay Media Studio 7.5 Examples
    Replies: 3
    Last Post: 04-09-2008, 03:18 PM
  2. Table questions
    By Dan Ullman in forum Setup Factory 7.0
    Replies: 2
    Last Post: 03-07-2007, 10:18 AM
  3. prob getting table to combobox
    By Jonas DK in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 01-05-2007, 04:56 PM
  4. string / table compare
    By gabrielfenwich in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 01-29-2005, 11:30 PM
  5. Creating a Table of Contents
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 11:35 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