[SOLVED]please need some help with this code :S - 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: [SOLVED]please need some help with this code :S (
/showthread.php?tid=119598)
[SOLVED]please need some help with this code :S -
TheChaoz - 08.01.2010
pawn Код:
696.public OnPlayerCommandText(playerid, cmdtext[])
697.{
698. if(ServerInfo[ReadCmds] == 1){
699. if(cmdtext != "register" && cmdtext != "login"){
700. new playername[MAX_PLAYER_NAME], string[128], i;
701. GetPlayerName(playerid, playername, sizeof(playername));
702. format(string, sizeof(string), ".:%s (%d) escribio: %s", playername,playerid,cmdtext);
703. for(i=0; i<MAX_PLAYERS; i++)
704. {
705. if(IsPlayerConnected(i) && PlayerInfo[i][Level] >= 5 && i != playerid)
706. {
707. Level5Chat(COLOR_GREY, string);
708. }
709. }
710. }
711. }
712. return 0;
713.}
Код:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pwn(699) : error 001: expected token: "-string end-", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
can someone tell me how to fix this?
Re: please need some help with this code :S -
mansonh - 08.01.2010
The error shows its at 699, but you have only included up to 688.
Include up to 700+
Re: please need some help with this code :S -
Rensieboy14 - 08.01.2010
I think you forgot a ; somewhere at the end of a line?
Re: please need some help with this code :S -
TheChaoz - 08.01.2010
Quote:
Originally Posted by mansonh
The error shows its at 699, but you have only included up to 688.
Include up to 700+
|
sory y have put wrong the numbers
Re: please need some help with this code :S -
Norck - 08.01.2010
Try
Код:
if(!strcmp("register",cmdtext,true) && !strcmp("login",cmdtext,true))
instead of
Код:
if(cmdtext != "register" && cmdtext != "login")
Re: please need some help with this code :S -
TheChaoz - 08.01.2010
Quote:
Originally Posted by Sinyavski
Try
Код:
if(!strcmp("register",cmdtext,true) && !strcmp("login",cmdtext,true))
instead of
Код:
if(cmdtext != "register" && cmdtext != "login")
|
same error.
i have script the register and the login on dcmd, does it make any diference
and sorry for mt bad english
Re: please need some help with this code :S -
TheChaoz - 08.01.2010
fixed y was missing a bracket. thanks