Jump to content

Recommended Posts

Posted

Hi everyone,

I would like to write a file within a DCS script with the following :

	-- Opens a file in read
	file = io.open("G:\test.lua", "w")
	file:write("TOTO\n")
	-- closes the open file
	io.close(file)

But I get an error accesing a nil value...

Howerver G is an valid USB key...
What's going on ?

 

Thanks ?

  • Solution
Posted
14 hours ago, CougarFFW04 said:

I get an error accesing a nil value...

Have you de-sanitized your DCS installation? By default, the modules lfs, io and os are 'sanitized', i.e. set to nil. That may be where you get the nil error from. It would of course help if you posted the error message and location where the error happened.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...