SA-MP Forums Archive
EOS wtf oOOo i dnt use EOS.. Edit please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: EOS wtf oOOo i dnt use EOS.. Edit please (/showthread.php?tid=88785)



EOS wtf oOOo i dnt use EOS.. Edit please - user226 - 28.07.2009

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...


Re: EOS wtf oOOo i dnt use EOS.. Edit please - Marcel - 28.07.2009

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.


Re: EOS wtf oOOo i dnt use EOS.. Edit please - user226 - 28.07.2009

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?