16.12.2010, 20:59
Hi,i've done this cmd for server suggestions:
But i get this errors:
What's wrong?
Код:
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; }
Код:
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.