new in pawno, help
#1

Hello, I am new in pawno coding. My question is how this can happen;

Code:
public OnPlayerText(playerid, text[])
{
	print(text[0]);
	return 1;
}
it outputs the whole text. not the first character but when I try something like;

Code:
public OnPlayerText(playerid, text[])
{
    text[0] = tolower(text[0]);
    return 1;
}
it lowers only the first character. it confuses me like really much. as you can see in prints output, text[0] means all of the text but tolower lowers only the first character.

Also, I read tolower function's info on wiki. It says;
Quote:

This function changes a single character to lowercase.

So how can it understand I mentioned the first character of that string? text[0] is all of the text, not only the first character. It should give errors in my view.

can somebody help?
Reply


Messages In This Thread
new in pawno, help - by fiha4155 - 16.06.2017, 02:33
Re: new in pawno, help - by Vince - 16.06.2017, 09:11
Re: new in pawno, help - by fiha4155 - 17.06.2017, 16:54
Re: new in pawno, help - by Vince - 17.06.2017, 18:29
Re: new in pawno, help - by DRIFT_HUNTER - 17.06.2017, 19:50
Re: new in pawno, help - by OneDay - 18.06.2017, 07:08
Re: new in pawno, help - by fiha4155 - 18.06.2017, 11:09
Re: new in pawno, help - by Dayrion - 18.06.2017, 11:14
Re: new in pawno, help - by fiha4155 - 18.06.2017, 11:26
Re: new in pawno, help - by DRIFT_HUNTER - 18.06.2017, 11:49
Re: new in pawno, help - by fiha4155 - 18.06.2017, 11:55
Re: new in pawno, help - by BigETI - 18.06.2017, 18:21

Forum Jump:


Users browsing this thread: 3 Guest(s)