/mask errors (Please help)
#1

Hello Guys,

After putting mask system which is this code

Код:
new Masked[MAX_PLAYERS];

CMD:mask(playerid)
{
	    if(Masked[playerid] == 0)
	    {
	        Masked[playerid] = 1;
	        foreach(Player,i)
	        {
				ShowPlayerNameTagForPlayer(i, playerid, 0);
			}
	        SCM(playerid, COLOR_LIGHTGREEN, "* You put your Mask on!");
	        return 1;
		}
		else if(Masked[playerid] == 1)
		{
		    Masked[playerid] = 0;
	        foreach(Player,i)
	        {
				ShowPlayerNameTagForPlayer(i, playerid, 1);
			}
		    SCM(playerid, COLOR_LIGHTGREEN, "* You took your Mask off!");
		    return 1;
		}
	        return 1;
}
I got this 2 errors :

pawn Код:
C:\Users\user\Desktop\[0.3x]Razer Roleplay\gamemodes\RZRP.pwn(95199) : error 017: undefined symbol "SCM"
C:\Users\user\Desktop\[0.3x]Razer Roleplay\gamemodes\RZRP.pwn(95209) : error 017: undefined symbol "SCM"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

Please help :c
Reply
#2

Search for stock SCM! SCM = SendClientMessage.
Reply
#3

search for Stock SCM or maybe use '' SendClientMessage'' by replacing '' SCM '' Undefined symbol
Reply
#4

Код:
#define SCM SendClientMessage
on the top of ur gamemode
Reply
#5

SCM = SendClientMessage, just replace it with that or #define it at the top.
Reply
#6

Either use #define SCM SendClientMessage on top of your script, or replace the SCM(Both) with SendClientMessage inside the command.
Reply
#7

On Top of script
pawn Код:
#define SendClientMessage
 OR

#define SCM
Reply
#8

Jankingston lol what are you talking about? SendClientMessage is already defined in the whole pawn language
Reply
#9

Quote:
Originally Posted by Jankingston
Посмотреть сообщение
On Top of script
pawn Код:
#define SendClientMessage
 OR

#define SCM
Both are wrong. Define a symbol to another symbol.

pawn Код:
#define SCM SendClientMessage
Anyways, BoU3A has already given the solution first.
Reply
#10

You can also shorten it a lot (half the lines) by doing something like this

pawn Код:
CMD:mask(playerid)
{
    if(!Masked[playerid]) {
        Masked[playerid] = 1;
        SCM(playerid, COLOR_LIGHTGREEN, "* You put your Mask on!");
    } else {
        Masked[playerid] = 0;
        SCM(playerid, COLOR_LIGHTGREEN, "* You took your Mask off!");
    }
    foreach(Player,i) ShowPlayerNameTagForPlayer(i, playerid, Masked[playerid]);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)