PDA

View Full Version : Strings in ZScript...?



ScaryBinary
05-15-2008, 11:25 PM
I saw a mysterious reference to strings and arrays in the release notes for one of the last few builds (776/777), and decided to experiment a bit. I got the following to compile:
ffc script StringTest{

void run(){
int myChar = 'a'; // A single character.
int myUserName[11] = "ScaryBinary"; // An array of characters, proper length.
int myBadExample[5] = "Overflow?"; // An array of characters, wrong length.

// Dump some stuff to the log file.
Trace(myChar);
Trace(myUserName[0]);
Trace(myBadExample[0]);
}

}

The script dumped the following to the log file:
97.0000
83.0000
79.0000

The numbers dumped to the log file are the ASCII codes for the individual characters in the arrays. However, myBadExample[4] returned the question mark (I was expecting "f"...).

At any rate, I couldn't do much else (anything, actually) with the strings/character arrays...will we be getting some special string functions soon :naughty: ....or are there some secret ones implemented already? Ones that might let us draw whatever text we want, where we want on the screen? :giggle:

jman2050
05-16-2008, 12:11 AM
We're getting there. The string support in ZScript is very preliminary, and its only real use right now is to provide some sort of string data storage that you can screw around with on your own to do crap.

C-Dawg
05-16-2008, 09:23 AM
Which we appreciate. Still, it's not too much of a pain in the ass to use the regular string editor in Zquest for now.

lucas92
12-29-2008, 10:31 PM
Bump.*

Is this going to be a Zelda Classic 2.5 scripting feature? It would be quite useful...

pkmnfrk
12-30-2008, 01:58 AM
I have heard absolutely nothing since I tried to do stuff with them, and failed horribly. (http://armageddongames.net/forums/showthread.php?t=104332)

lucas92
12-30-2008, 09:33 PM
I thought of returning the hour in Zelda Classic with a sign ffc script but it's impossible without making strings... Unless making 24 different strings, and it doesn't even include the minutes. O_0