SA-MP Forums Archive
Simple error, Which i couldnt fix. - 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: Simple error, Which i couldnt fix. (/showthread.php?tid=273628)



Simple error, Which i couldnt fix. - Mr.1337 - 02.08.2011

Errors:

Код:
95:error 010: invalid function or declaration
98:error 010: invalid function or declaration
Lines:
Код:
	if (strcmp("/test", cmdtext, true, 10) == 0) -----> 95
	{
		SendClientMessage(playerid, WHITE,  " TEST " );
		return 1; -----> 98
	}



Re: Simple error, Which i couldnt fix. - Calgon - 02.08.2011

"/test" is 5 characters, not 10.

pawn Код:
if(strcmp(cmdtext, "/test", true, 5) == 0) {
   SendClientMessage(playerid, WHITE, " TEST ");
   return 1;
}



Re: Simple error, Which i couldnt fix. - Mr.1337 - 02.08.2011

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
"/test" is 5 characters, not 10.

pawn Код:
if(strcmp(cmdtext, "/test", true, 5) == 0) {
   SendClientMessage(playerid, WHITE, " TEST ");
   return 1;
}
Doesnt work, same errors


Re: Simple error, Which i couldnt fix. - Calgon - 02.08.2011

Did you place the command inside OnPlayerCommandText?


Re: Simple error, Which i couldnt fix. - Mr.1337 - 02.08.2011

^Yup.


AW: Simple error, Which i couldnt fix. - Drebin - 02.08.2011

Give us a few lines above 95 (85-94)


Re: Simple error, Which i couldnt fix. - Mr.1337 - 02.08.2011

Nevermind, I've fixed it, btw, Thanks.