new file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), %s.ini, name); if(strcmp(cmdtext,"/colourred",true) == 0) { SetPlayerColor(playerid,0xff0000ff); return 1' } if(strcmp(cmdtext,"/savecolour",true) == 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; }
/*
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];
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;
}
error 017: undefined symbol "name"
error 017: undefined symbol "name"
error 029: invalid expression, assumed zero
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.
new name[MAX_PLAYER_NAME];
/*
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;
}
(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.
format(file, sizeof(file), "%s.ini", name);
Aswell, i dont think you can have spaces "/cc 1" in your commands.
|
if (strcmp("/color save", cmdtext, true) == 0)