SA-MP Forums Archive
help please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help please (/showthread.php?tid=378873)



help please - adelmika - 19.09.2012

Where is the Error here



Код:
D:\Samp\samp03e_svr_R2_win32\gamemodes\Start.pwn(94) : error 017: undefined symbol "COLOR_Yellowe"
D:\Samp\samp03e_svr_R2_win32\gamemodes\Start.pwn(100) : error 017: undefined symbol "COLOR_Red"
D:\Samp\samp03e_svr_R2_win32\gamemodes\Start.pwn(105) : error 017: undefined symbol "COLOR_Red"
D:\Samp\samp03e_svr_R2_win32\gamemodes\Start.pwn(106) : error 017: undefined symbol "COLOR_Red"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
.
Код:
       if (strcmp("/heal", cmdtext, true, 5) == 0)
       {
       SetPlayerHealth(playerid, 100);
       SendClientMessage(playerid, COLOR_Yellowe, "(INFO) You have been healed!");
       return 1;
       }
       if (strcmp("/kill", cmdtext, true, 5) == 0)
       {
       SetPlayerHealth(playerid, 0);
       SendClientMessage(playerid, COLOR_Red, "(INFO) You have commited suicide!");
       return 1;
       }
       if (strcmp("/help", cmdtext, true, 5) == 0)
       {
       SendClientMessage(playerid, COLOR_Red, "(INFO) Welcome to my Server's HELP command!");
       SendClientMessage(playerid, COLOR_Red, "(INFO) Hope you enjoy the tutorial!");
       return 1;
       }
	   return 0;

	}



Re: help please - adelmika - 19.09.2012

can someone help me please


AW: help please - Blowfish - 19.09.2012

Obviously COLOR_Red and COLOR_Yellowe are not defined.
Put something like this to the beginning of your script:

Код:
#define COLOR_Red 0xFF0000FF
#define COLOR_Yellowe 0xFFFF00FF



Re: help please - HuSs3n - 19.09.2012

pawn Код:
if (strcmp("/heal", cmdtext, true, 5) == 0)
       {
       SetPlayerHealth(playerid, 100);
       SendClientMessage(playerid, 0xFFA600FF, "(INFO) You have been healed!");
       return 1;
       }
       if (strcmp("/kill", cmdtext, true, 5) == 0)
       {
       SetPlayerHealth(playerid, 0);
       SendClientMessage(playerid, 0xE62525FF, "(INFO) You have commited suicide!");
       return 1;
       }
       if (strcmp("/help", cmdtext, true, 5) == 0)
       {
       SendClientMessage(playerid, 0xE62525FF, "(INFO) Welcome to my Server's HELP command!");
       SendClientMessage(playerid, 0xE62525FF, "(INFO) Hope you enjoy the tutorial!");
       return 1;
       }
       return 0;

    }



Re: help please - Glint - 19.09.2012

or maybe they are defined maybe you are using them the wrong way try to use this instead.

COLOR_Red = COLOR_RED
COLOR_Yellowe = COLOR_YELLOW

If it is not defined the as "Blowfish" said define them by adding
pawn Код:
#define COLOR_RED 0xFF0000FF
#define COLOR_YELLOW 0xFFFF00FF



Re: help please - adelmika - 19.09.2012

mean to put colors id not the name right ?


Re: help please - Glint - 19.09.2012

Quote:
Originally Posted by adelmika
Посмотреть сообщение
mean to put colors id not the name right ?
Yes you can also put color codes instead of names like "HuSs3n" said above.


Re: help please - adelmika - 19.09.2012

thank you guys


Re: help please - Lordzy - 19.09.2012

You must define those.
Here Color_Red has been used in SendClientMessage function but Pawno doesn't knows what Color_Red is, unless you define it.
In colors, Pawn reads Hex color codes only.
And when you define something with color hex code, the defined symbol will work exactly as the hex code which was used for defining.
pawn Код:
#define Color_Red 0xFF0000 //Here 0xFF0000 is a hex color code and is red.
pawn Код:
#define Color_Yellow 0xFF0000 //Here 0xFF0000 is a hex color code and is red itself. Colors don't change according to define used.
 //If you use red's hex code for Color_yellow, thats what it also performs.
So define your color codes or those stuff.


Re: help please - adelmika - 19.09.2012

https://www.youtube.com/watch?v=fmdW...feature=relmfu
ido like this man say and when enter server and try cmds nothing happend