19.03.2011, 17:44
pawn Код:
/*
Colour Save
*/
#include <a_samp>
#include <dini>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Colour Save!");
print("--------------------------------------\n");
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
new file[256],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), %s.ini, name);
if (strcmp("/cc 1", cmdtext, true, 10) == 0)
{
SetPlayerColor(playerid, 0xff0000ff);
SendClientMessage(playerid, 0xff0000ff, "%s has changed the colour");
return 1;
}
if (strcmp("/color save", cmdtext, true, 10) == 0)
{
if(dini_Int(file,"alreadysaved") != 0) return SendClientMessage(playerid,0xff0000ff,"Sorry , but you already saved your color once!");
if(!dini_Int(file,"alreadysaved"))
{
dini_IntSet(file,"savedcolour",GetPlayerColor(playerid));
dini_IntSet(file,"alreadysaved",1);
}
return 1;
}
return 0;
}
pawn Код:
(25) : error 029: invalid expression, assumed zero
(25) : error 017: undefined symbol "s"
(25) : error 029: invalid expression, assumed zero
(25) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.