跳转到帖子

Writing a file


转到解决 由cfrag解决,

已推荐帖子

发布于

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 ?

  • 解答
发布于
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.

  • 最近浏览   0位会员

    • 没有会员查看此页面。
×
×
  • 创建新的...