The Daily Click ::. Forums ::. Klik Coding Help ::. The File Object's "Append text to file" function is giving me grief. >_>
 

Post Reply  Post Oekaki 
 

Posted By Message

FormFitMouthguard



Registered
  28/05/2008
Points
  4
28th May, 2008 at 16:27:12 -

Goal is to be archiving the contents of a chat box for a fairly simple multiplayer game I am working on.
Is doing this by GetText$( "Chat", 0, GetNChars( "Chat" ))aaaaaand sending it to C:\archive.txt
That LOOKS right to me. Grabbin' characters 0 to <number of characters in text box> should copy it all, right? Buuuuuut it doesn't work past a certain point. Not like, some ridiculously huge amount of text either. Cutoff point seems static, unrelated to amount of text. Not that I've made an exact count. It'd cut off the last 10% of this post, probably.
So what am I doing wrong? How can I fix it?

EDIT: Seems to cut off at 259 characters, but I could have miscounted.

Image Edited by the Author.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
28th May, 2008 at 21:14:45 -

Dunno about MMF, or the way you're doing chat... but the way you explained it... how 'bout just plain ol' gettext? (Not the right syntax)

 

  		
  		

FormFitMouthguard



Registered
  28/05/2008
Points
  4
29th May, 2008 at 00:36:47 -

Tried that, still cuts off at 259(ish?) characters.

 
n/a

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
29th May, 2008 at 09:27:16 -

Maybe try switching from one text object to another after so many characters are used.
Or forget the text object altogether, and use another method.
But either of those might not be viable options depending upon what your code is.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
29th May, 2008 at 12:06:01 -

I seem to recall the Edit object allowing the direct saving of txt files... I'm positive of it, in fact...

 

  		
  		

FormFitMouthguard



Registered
  28/05/2008
Points
  4
30th May, 2008 at 20:50:19 -

Aha. So it does. RTF object does too. But both of them simply REPLACE the contents of the text file. Unsuitable for an archive, as I need to be able to tack on stuff repeatedly.

 
n/a

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
30th May, 2008 at 23:43:19 -

Open the file... Add text on... Save it?

 
Image
http://bfollington.tumblr.com

FormFitMouthguard



Registered
  28/05/2008
Points
  4
31st May, 2008 at 00:32:46 -

*Slaps forehead.* OF COURSE.
Yeah, just had it load the archive at the beginning and save it at the end.

Yay for satisfactory conclusions. Thank you.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
31st May, 2008 at 09:19:47 -

You're welcome. I would've come up with the rest of the solution had I seen you had replied.

 

  		
  		
   

Post Reply



 



Advertisement

Worth A Click