Author Topic: First letter not showing.  (Read 707 times)

In this code.
Code: [Select]
function Speak(%message)
{
MessageAll("", "\c7Jasa\c3Jasa\c7\Jasa\c6: " @ getSubStr(%message,1,strLen(%message)-1));
}
If I enter speak("Message"); in console the first letter doesn't appear in the message. Thus messaging essage. What am I doing wrong to have it not show the first letter?

ere you beaten in the head when you were little?

ere you beaten in the head when you were little?

es, I think he might have been.

ere you beaten in the head when you were little?
ust when I cried, but that caused me to cry more.

ou should change the "1" in getSubStr to "0"

Quote
usage: getSubStr(string str, int start, int numChars) Returns the substring of str, starting at start, and continuing to either the end of the string, or numChars characters, whichever comes first.


h, I see.
ctually, just get rid of "getSubStr(...)" alltogether and replace it with "%message"

ctually, just get rid of "getSubStr(...)" alltogether and replace it with "%message"
hought it had to be more complicated than that.

lso, would the message start at 0, or 1?
s in abcdefg, 1 would be a or b?

String and array indexes in programming always start at 0 except for a few languages.

String and array indexes in programming always start at 0 except for a few languages.
ah, and bummer, you broke the chain