EOS wtf oOOo i dnt use EOS.. Edit please
#1

I created code:

Код:
	if(strcmp(cmdtext, "/moxra", true, 6) == 0)
	{
	if(cmdtext[7] == 32 && cmdtext[6] != EOS) return SendClientMessage(playerid, 0xFAFAFAFF, "do not good !!!");
	else if(strcmp(cmdtext[7], "sychka", true) == 0)
	{
	SendClientMessageToAll(0xFFFFFF00,color,"GOOD!");
	}
	else SendClientMessage(playerid, 0xFAFAFAFF, "do not good !");
	return true;
	}
Where error this code wrong?
When I write / moxra, Answer: SERVER: Unknomw command.
But when I write, / moxra dsaasdas, / moxra sychka, etc all this good!
I know that the bug is likely in this line:
Код:
if(cmdtext[7] == 32 && cmdtext[6] != EOS) return SendClientMessage(playerid, 0xFAFAFAFF, "do not good !!!");
Help Me please...
Reply
#2

EOS means End Of String, so if you do
pawn Код:
if(cmdtext[7] == 32 && cmdtext[6] != EOS)
it checks if the 7th character of cmdtext is the end of the string.
Reply
#3

Quote:
Originally Posted by Marcel
EOS means End Of String, so if you do
pawn Код:
if(cmdtext[7] == 32 && cmdtext[6] != EOS)
it checks if the 7th character of cmdtext is the end of the string.
What do you recommend?
what to edit?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)