File i/o js engine apparently not working?

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
mrboris
UOX3 Neophyte
Posts: 28
Joined: Wed Jun 30, 2004 4:00 am
Has thanked: 0
Been thanked: 0
Contact:

File i/o js engine apparently not working?

Post by mrboris »

Code: Select all

	var mFile = new UOXCFile;
	mFile.Open( "test.dat", "a" );
	var name = new Array();
	name[1]= mFile.ReadUntil( "s" );
i have a gump after that, that includes name[1] in the text but if clicked it just gives me the error 'you do not know how to use that item' but if those 4 lines are removed, the gump shows up.

i've always tried the Read( 10); and nothing showed up then as well.

this was all used in a onUse function.
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

You're wanting to read, but you've actually opened the file for append (change "a" to "r").

Also, try changing the new statement to something like

Code: Select all

var mFile = new UOXCFile();
mrboris
UOX3 Neophyte
Posts: 28
Joined: Wed Jun 30, 2004 4:00 am
Has thanked: 0
Been thanked: 0
Contact:

Post by mrboris »

tried all those changes, still get 'you can't think of a way to use that'
mrboris
UOX3 Neophyte
Posts: 28
Joined: Wed Jun 30, 2004 4:00 am
Has thanked: 0
Been thanked: 0
Contact:

Post by mrboris »

any new updates maarc?
Post Reply