Announcement

Collapse
No announcement yet.

Error attempt to index global 'Request' (a nil value)

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

  • Error attempt to index global 'Request' (a nil value)

    Hi, i have a problem here!
    When i run the application on the Preview mode it runs ok, without any problem!
    But, when i convert it on a .exe file, and when i run it i have the following error:

    Code:
    Error attempt to index global 'Request' (a nil value)
    1:[Globals] Line: 20 in function 'VersionInfo'
    2:[Main -> On Preload] Line: 7 in main chunk
    This is the code of the VersionInfo() function on the Globals:

    Code:
    function VersionInfo()
    	local FilePath = _SourceFolder.."\\".._SourceFilename;
    	Request = File.GetVersionInfo(FilePath);
    	Request.ProductVersion = String.Replace(Request.ProductVersion, ".0.0", "", false);
    	return Request.ProductVersion;
    end
    Can you give me an help here?
    Thank you!

  • #2
    to detect your error
    display _SourceFolder.."\\".._SourceFilename in a dialog message
    then tell us

    Comment


    • #3
      Hi startup, and thank you for reply!

      Dialog says: "C:\Users\User\AppData\Local\Temp\ir_ext_temp_24\A pp_v1.0.exe"

      Problem is... i need to get the Folder name where the main application is (App_v1.0.exe) and not the Temporary folder!
      I my case the main file is on "C:\Downloads\" but it can be other folder (with a different name).

      Thank you for support!

      Comment


      • #4
        Search the documentation for SFXSOURCE:.

        Ulrich

        Comment


        • #5
          I think that this example with help you. Link

          Comment


          • #6
            Thank you for support!

            Comment

            Working...
            X