Author Topic: Note about WRITE_ASCII  (Read 6308 times)

dorotea

  • Guest
Note about WRITE_ASCII
« on: December 28, 2002, 02:53:12 PM »
It took me about half a day to figure out that when you try to use WRITE_ASCII to replace already existing string it had to be exactly the same length or larger ( never tried larger but I suppose it will work)

I needed replace a dialog say

Noober1.dlg with New.dlg in the cre file

by doing

WRITE_ASCII 0x2CC ~New~


And - it always came out as Newber1.dlg which kind of made me tear my hair out until I realised what was going on.                    

japheth

  • Guest
Note about WRITE_ASCII
« Reply #1 on: December 30, 2002, 03:11:58 PM »
You have to embed a null character in the file to terminate the string since WeiDU doesn't do it for you.

This can be done by opening up your .tp2 file after it's been completed in a hex editor, finding the offset where you need to embed a null character, and inserting 00 hex right after the end of the string.

EditPadPro is pretty good for this since you can switch between Hex, Unicode, and ANSI with it.

You can get it here.

Oh, and as a side note, ALT+255 is *not* an ASCII null character.  I'm not sure what the ALT code is (or if there even is an ASCII ALT code) for a null character.                    



[!--EDIT|japheth|Dec 30 2002, 07:13 PM--]

Lone Wolf

  • Guest
Note about WRITE_ASCII
« Reply #2 on: December 31, 2002, 09:27:56 AM »
There is no ALT shortcut for an NULL char. The first 32 ASCII chars don't get displayed in Windows(that is in plain text mode), Tabs, Linefeeds & carriage returns excluded.                    

dorotea

  • Guest
Note about WRITE_ASCII
« Reply #3 on: December 31, 2002, 01:18:02 PM »
Just downloaded EditPadPro - and going to try it now!

Thanks japheth - you are the best!

Now if only somebody can look through the "Redemption' code with an eye of a professional ...

But that's asking too much!

 ;)                    

Blucher

  • Guest
Note about WRITE_ASCII
« Reply #4 on: January 02, 2003, 05:58:01 PM »
This was giving me trouble too, but I found a very simple and easy way.

Make sure your tp2 file is in unix text format (no windows notepad, etc. use an editor like PFE, ConTEXT & Co.).  Whenever you want to add a terminating null just hit [ENTER] each time you need a truly blank spot.

For instance:

    WRITE_ASCII 0x250 ~none



~

Where you'd type:
[tilde] [n]
  • [n] [e] [enter] [enter] [enter] [enter] [tilde]


If that makes any sense. :)                    

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: