Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

You have to turn off the sandbox lua option to be able to write to/delete a file or directory. Go to Tools-->Options... and uncheck the 'Sandbox Lua' option.

 

Also the first picture you posted shows you trying to write to a file in the 'Config' directory. If that directory does not already exist, it will fail to write to the file. Look at the FileSystem:CreateDir() to create a directory - again this requires that the sandbox lua option be unchecked. Keep in mind that Leadwerks Game Launcher will not allow un-sandboxed commands like writing to or deleting a file.

 

Edit-- a way to get around the sandbox issue is to write to your game's config file (typically located at 'C:\Users\~ComputerName~\AppData\Local\~GameName~\GameName.cfg') using System:SetProperty(key, value) then reading the key using System:GetProperty(key).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...