Problem with a cmd
#1

Hi,i've done this cmd for server suggestions:

Код:
	new cmd[35];
	
	if(strcmp(cmd,"/sugg",true,12)==0)
    {
      if(strlen(cmdtext) < 13) return SendClientMessage(playerid,"Usage: /sugg [You suggestion to improve the server.]");
      new name[30];
      new sug[126];
      GetPlayerName(playerid,name,30);
      strmid(sug,cmdtext,13,strlen(cmdtext));
      new string[256];
      format(string,256,"Suggestion - Author: %s - Details: %s",name,sug);
      SendClientMessage(playerid,COLOR_ORANGE,"Your suggestion said:");
      SendClientMessage(playerid,COLOR_ORANGE,string);
      SendClientMessage(playerid,COLOR_ORANGE,"Thank you for submitting the suggestion and making this server better.");
      new File:sug;
      sug = fopen("/LOGS/sugg.log",io_append);
      format(string,256,"%s\r\n",string);
      fwrite(sug,string);
      fclose(sug);
      return 1;
    }
But i get this errors:

Код:
C:\Documents and Settings\k\Desktop\SFWAR.pwn(445) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Symone\k\SFWAR.pwn(455) : error 021: symbol already defined: "sug"
C:\Documents and Settings\Symone\k\SFWAR.pwn(489) : error 021: symbol already defined: "cmd"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
What's wrong?
Reply


Messages In This Thread
Problem with a cmd - by Face9000 - 16.12.2010, 20:59
Re: Problem with a cmd - by Benjo - 16.12.2010, 21:40

Forum Jump:


Users browsing this thread: 1 Guest(s)