[SOLVED]please need some help with this code :S
#1

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?
Reply
#2

The error shows its at 699, but you have only included up to 688.
Include up to 700+
Reply
#3

I think you forgot a ; somewhere at the end of a line?
Reply
#4

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
Reply
#5

Try
Код:
if(!strcmp("register",cmdtext,true) && !strcmp("login",cmdtext,true))
instead of
Код:
if(cmdtext != "register" && cmdtext != "login")
Reply
#6

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
Reply
#7

fixed y was missing a bracket. thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)