29.08.2012, 00:02
Well im a newbie mapper, so i decided to begin scripting so this is what i did.
So after that i decided to compile and run so i got these errors.
PS: I'm planning on editing the script further, so i made all those defines so when i need more colors i dont need to go up and define or get the codes again.
Код:
#include a_samp
#define Filterscript
#define COLOR_GREEN 0x008000FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_BRIGHTRED 0xFF000AAA
#define COLOR_AQUA 0x00FFFFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_BEIGE 0xFFF8DCAA
#define COLOR_BLACK 0x000000AA
#define COLOR_LIGHTERBLUE 0x00BFFFAA
#define COLOR_BLUELIGHT 0x1E90FFAA
#define COLOR_BLUEMEDIUM 0x0000CDAA
#define COLOR_BLUEDARK 0x00008BAA
#define COLOR_PINK 0xFF1493AA
#define COLOR_PINKDARK 0xFF00FFAA
#define COLOR_GREENLIGHT 0x00FF00AA
#define COLOR_GREENDARK 0x006400AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OKER 0x808000AA
#define COLOR_ORANGE 0xFF4500AA
#define COLOR_ORANGELIGHT 0xFF8C00AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_VIOLETDARK 0x9400D3AA
#define COLOR_INDIGO 0xAB0082AA
#define COLOR_RED 0xFF0000AA
#define COLOR_SAND 0xFFDEADAA
#define COLOR_SILVER 0xC0C0C0AA
#define COLOR_TEAL 0x008080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GOLD 0xFFD700AA
#define COLOR_BROWN 0x8B4513AA
#define COLOR_BROWNLIGHT 0xA0522DAA
#define COLOR_GRAY 0xA9A9A9AA
#define COLOR_GRAYDARK 0x696969AA
#define COLOR_INVISIBLE 0xFFFFFF00
public OnPlayerCommand
if (strcmp("/healhelp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_RED,"If you want to heal yourself use /healme, wich will cost 500 and for armour /armour wich will be 1000.");
return 1;
}
if (strcmp("/healme", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,100);
GivePlayerMoney(playerid,-500);
SendClientMessage(playerid,COLOR_GREEN,"You have reafilled your health.");
SendClientMessage(playerid,COLOR_BLUE,"Make sure to /healhelp for more information!");
return 1;
}
if (strcmp("/armour", cmdtext, true, 10) == 0)
{
SetPlayerArmor(playerid,100);
SendClientMessage(playerid,COLOR_RED,"You have refilled your armour.");
SendClientMessage(playerid,COLOR_BLUE,"Make sure to /healhelp for more information!");
return 1;
}
Код:
C:\Users\Juan\Desktop\TEST V1.pwn(41) : error 001: expected token: ";", but found "if" C:\Users\DJ\Desktop\TEST V1.pwn(44) : error 010: invalid function or declaration C:\Users\DJ\Desktop\TEST V1.pwn(46) : error 010: invalid function or declaration C:\Users\DJ\Desktop\TEST V1.pwn(52) : error 010: invalid function or declaration C:\Users\DJ\Desktop\TEST V1.pwn(54) : error 010: invalid function or declaration C:\Users\DJ\Desktop\TEST V1.pwn(57) : error 021: symbol already defined: "SendClientMessage" C:\Users\DJ\Desktop\TEST V1.pwn(60) : error 010: invalid function or declaration C:\Users\DJ\Desktop\TEST V1.pwn(62) : warning 203: symbol is never used: "OnPlayerCommand" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.

