Error On /mask
#1

Script:
pawn Code:
new masked[MAX_PLAYERS];
pawn Code:
CMD:mask(playerid, params[])
    if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pAdmin] < 2 || (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
    {
    SendClientMessage(playerid, COLOR_GREY, "    You are not authorized to use that command!");
    }
    if(masked[playerid] == 0)
    {
    masked[playerid] = 1;
    SendClientMessage(playerid, -1,"You are now masked.");
    }
    else
    {
    masked[playerid] = 0;
    SendClientMessage(playerid, -1,"You are no longer masked.");
    }
    return 1;
    }
pawn Code:
if(masked[playerid] == 1)
{
    new string[128];
    format(string, sizeof(string),"Stranger says: %s", text);
    SendClientMessageToAll(-1, string);
}


else
{
    new string[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string),"%s says: %s", name, text);
    SendClientMessageToAll(-1, string);
}



return 0;
Errors
pawn Code:
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(30803) : error 029: invalid expression, assumed zero
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(30806) : error 010: invalid function or declaration
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(30811) : error 010: invalid function or declaration
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(30816) : error 010: invalid function or declaration
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(69744) : warning 217: loose indentation
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(69744) : warning 219: local variable "masked" shadows a variable at a preceding level
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(69747) : warning 219: local variable "string" shadows a variable at a preceding level
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(69755) : warning 219: local variable "string" shadows a variable at a preceding level
F:\My favorite sa-mp script\gamemodes\EXRP..pwn(85797) : warning 203: symbol is never used: "masked"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
pawn Code:
Line 30803 =    {
Line 30806 =    if(masked[playerid] == 0)
Line 30811 =    else
Line 30816 =    return 1;
Line 69744 = new masked[MAX_PLAYERS];
Line 69747 =     new string[128];
Line 69755 =     new string[128], name[MAX_PLAYER_NAME];
Line 85797 = (Oh My God No Line Here)
Reply
#2

Could you comment the lines also? And it seems like you never used this:

pawn Code:
new masked[MAX_PLAYERS];
Delete it then, and show me your enum for the playerinfo!
Reply
#3

Quote:
Originally Posted by Twisted_Insane
View Post
Could you comment the lines also? And it seems like you never used this:

pawn Code:
new masked[MAX_PLAYERS];
Delete it then, and show me your enum for the playerinfo!
Where is it?
Reply
#4

You just showed it in your first post, hellow? Find it in your script and then delete it!
Reply
#5

pawn Code:
CMD:mask(playerid, params[])
    if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pAdmin] < 2 || (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
    {
    SendClientMessage(playerid, COLOR_GREY, "    You are not authorized to use that command!");
    }
    if(masked[playerid] == 0)
    {
    masked[playerid] = 1;
    SendClientMessage(playerid, -1,"You are now masked.");
    }
    else
    {
    masked[playerid] = 0;
    SendClientMessage(playerid, -1,"You are no longer masked.");
    }
    return 1;
    }
Line 69747 = new string[128];
Line 69755 = new string[128], name[MAX_PLAYER_NAME];
remove new string on both those lines and remove new masked on line 69744 .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)