20.11.2011, 13:51
Hey, i just made an AFK system. (My first script)
But then i get three errors:
Whats the problem here?
pawn Код:
#include <a_samp>
#define COLOR_ONE 0xFF0000FF
#define COLOR_TWO 0x00FF00FF
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Mac's AFK System");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/AFK", cmdtext, true, 10) == 1)
{
new message[40], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(message,sizeof(message),"%s is now AFK!",name);
SendClientMessage( playerid, COLOR_ONE, message);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/BACK", cmdtext, true, 10) == 1)
{
new message[40], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(message,sizeof(message),"%s is now BACK!",name);
SendClientMessage( playerid, COLOR_TWO, message);
return 1;
}
return 0;
}
Код:
C:\Users\***\Desktop\samp\scripts\Mac's AFK System.pwn(37) : error 029: invalid expression, assumed zero C:\Users\***\Desktop\samp\scripts\Mac's AFK System.pwn(37) : error 029: invalid expression, assumed zero C:\Users\***\Desktop\samp\scripts\Mac's AFK System.pwn(52) : error 030: compound statement not closed at the end of file (started at line 28) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.