coderanger
02-14-2009, 02:20 PM
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:
-- 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
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:
-- 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