20.03.2011, 15:27
Hi, when I have this code and try to compile:
I get the following errors:
Any ideas how to fix it?
pawn Код:
#include <a_samp>
#include <ZCMD>
#include <Dini>
CMD:creategang( playerid, params [ ] )
{
if (isnull(params)) { return SendClientMessage(playerid, -1, "Syntax: /creategang <name>"); }
new creategang;
format(creategang, sizeof(creategang), "Gangs\%s", params);
new gangname;
format(gangname, sizeof(gangname), "%s", params);
if (dini_Exists(creategang) = true) { return SendClientMessage(playerid, -1, "This gang already exists."); }
if (dini_Exists(creategang) = false)
{
new leader;
GetPlayerName(playerid,leader, sizeof(leader));
new string[128];
format(string,128,"Your gang %s has been created.", params);
dini_Create(creategang);
dini_Set(creategang,"Gang Name",gangname);
dini_Set(creategang,"Leader",leader);
return 1;
}
Код:
C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(9) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(9) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(11) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(11) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(12) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(12) : warning 215: expression has no effect C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(12) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(12) : error 029: invalid expression, assumed zero C:\Documents and Settings\Anthony Dupont\Bureau\KrazyParadise\filterscripts\gangsystem.pwn(12) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.