Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


bug? saveToFileNoError does not report status

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Bavarian
Cheater
Reputation: 0

Joined: 28 Feb 2018
Posts: 30

PostPosted: Sat Feb 27, 2021 7:28 am    Post subject: bug? saveToFileNoError does not report status Reply with quote

tryin to open file and save it with saveToFileNoError
saveToFileNoError does not seem to report status neither true nor false

this API does save a file, am I using it incorrectly?

Code:

local path    = "C:\\Games\\file.txt"       --both folder and file exist
local path2   = "C:\\Gamess\\file.txt.bak"  --folder does not exist

local original = createMemoryStream()
local r,e;
r,e=original.loadFromFileNoError(path)
print(tostring(r).."-load no error")
r,e = original.saveToFileNoError(path..".bak")
print(tostring(r).."-save1 with no error")
r,e = original.saveToFileNoError(path2)
print(tostring(r).."-save2 with error")

 original.destroy()


Code:

true-load no error
nil-save1 with no error
nil-save2 with error
Back to top
View user's profile Send private message
Oxijen
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 163
Location: On The Moon

PostPosted: Sun Feb 28, 2021 1:00 pm    Post subject: Reply with quote

maybe nil means false?
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum Wink
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25296
Location: The netherlands

PostPosted: Sun Feb 28, 2021 4:13 pm    Post subject: Reply with quote

fixed, thanks
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites