Jump to content
Sign in to follow this  
hftrade

FileMode.WRITE Handle always = 0

Recommended Posts

After update, not work write in file.

v_fHandle    =    OpenFile(v_FileName, FileMode.WRITE);

filehandle always equal 0.

Share this post


Link to post
Share on other sites

Does the file exist? I don't think they would've changed anything for OpenFile.

Share this post


Link to post
Share on other sites

It's confirmed broken by numerous modders. Just wait till they fix it.

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, IMT said:

Does the file exist? I don't think they would've changed anything for OpenFile.

read\append\FileExist - it works

OpenFile - not

I've checked with and without a file

Share this post


Link to post
Share on other sites
2 minutes ago, hftrade said:

read\append\FileExist - it works

OpenFile - not

I've checked with and without a file

Well, seems I was wrong, it's broken:

2 minutes ago, DannyDog said:

It's confirmed broken by numerous modders. Just wait till they fix it.

 

Share this post


Link to post
Share on other sites

Getting reports that it's fixed now. This also explains why crafting broke in the previous patch.

Share this post


Link to post
Share on other sites
1 hour ago, DannyDog said:

Getting reports that it's fixed now.

........

v_fHandle    =    OpenFile(cv_fName, FileMode.WRITE);
Print(string.Format("v_fHandle: %1", v_fHandle));

.........

SCRIPT       :  cv_fName: $profile:SF_DB_CURRENCY.bin
SCRIPT       :  v_fHandle: 0x0000000000000000

Share this post


Link to post
Share on other sites

OpenFile() seems still broken, if you absolutely need it i suggest trying with FileSerializer.

Share this post


Link to post
Share on other sites
FileSerializer	file	=	new FileSerializer();
if (file.Open(cv_fName, FileMode.WRITE))
	{
		Print("+++++");
		file.Write(cv_CPS);
		CloseFile(file);
	}
else
	{Print("-----");}

-----

Edited by hftrade

Share this post


Link to post
Share on other sites
16 hours ago, hftrade said:

FileSerializer	file	=	new FileSerializer();
if (file.Open(cv_fName, FileMode.WRITE))
	{
		Print("+++++");
		file.Write(cv_CPS);
		CloseFile(file);
	}
else
	{Print("-----");}

-----

result:

SCRIPT       : Registered 365 temporary action enum(s), UAN==365
SCRIPT       : CreateGame()
SCRIPT       : -----

SCRIPT    (E): ScriptSerializer writing not allowed!

 

Edited by AXEL777

Share this post


Link to post
Share on other sites
On 09.11.2018 at 1:34 PM, Mizev said:

I solved this problem only with IDA Pro.

how? please, describe this

Share this post


Link to post
Share on other sites
On 10/11/2018 at 12:30 PM, AXEL777 said:

how? please, describe this

Random russian spam i guess, ignore it.

Fixed the write issue by adding -scrAllowFileWrite launch option. (thx kerkkoh for wasting a few days on -srcAllowFileWrite :D :P )

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×