Mask Error
#1

Hey,

I get these errors:
pawn Код:
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(5945) : error 017: undefined symbol "cmd_mobile"
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(7108) : error 017: undefined symbol "showHelp"
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11951) : error 029: invalid expression, assumed zero
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11951 -- 11952) : warning 215: expression has no effect
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11952) : error 001: expected token: ";", but found "if"
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11956) : warning 217: loose indentation
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11961) : warning 217: loose indentation
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11962) : warning 225: unreachable code
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11962) : warning 217: loose indentation
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11965) : warning 225: unreachable code
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11965) : error 029: invalid expression, assumed zero
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11969) : warning 217: loose indentation
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11972) : warning 225: unreachable code
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11972) : warning 217: loose indentation
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11972) : error 029: invalid expression, assumed zero
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11972) : error 017: undefined symbol "cmd_aduty"
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11972) : error 029: invalid expression, assumed zero
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11972) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.
On this command:
pawn Код:
CMD:mask(playerid, params[]) {
        if(playerVariables[playerid][pGroup] !=7))
        if(isMasked[playerid] == 0)
        {
            new randomID = random(200);
            new string[35];
                GetPlayerName(playerid, string, sizeof(string));
                strmid(OldUsername[playerid], string, 0, strlen(string), 64);
                format(string,sizeof(string), "Masked_%d", randomID);
                SetPlayerName(playerid, string);
                SendClientMessage(playerid, COLOR_GREY, "You have put on a mask! (/mask to disable)");
            return 1;
        {
        return SendClientMessage(playerid, COLOR_GREY, "You do now have the right privillages to use this command.");
        }
        else {
            SetPlayerName(playerid, OldUsername[playerid]);
            isMasked[playerid] = 1;
            SendClientMessage(playerid, COLOR_GREY, "You have taken off your mask!");
      return 1;
}
can someone help please.
Reply
#2

pawn Код:
CMD:mask(playerid, params[]) {

    if(playerVariables[playerid][pGroup] != 7) {
   
        if(isMasked[playerid] == 0) {
       
            new randomID = random(200);
            new string[35];
           
            GetPlayerName(playerid, string, sizeof(string));
            strmid(OldUsername[playerid], string, 0, strlen(string), 64);
            format(string,sizeof(string), "Masked_%d", randomID);
            SetPlayerName(playerid, string);
            return SendClientMessage(playerid, COLOR_GREY, "You have put on a mask! (/mask to disable)");
        }
        else return SendClientMessage(playerid, COLOR_GREY, "You do now have the right privillages to use this command.");
   
    }
    else
    {
        SetPlayerName(playerid, OldUsername[playerid]);
        isMasked[playerid] = 1;
        SendClientMessage(playerid, COLOR_GREY, "You have taken off your mask!");
        return true;
    }
    return true;
}
Try that.
Reply
#3

The first one I can see is this:

PHP код:
if(playerVariables[playerid][pGroup] !=7)) 
Change it to this:

PHP код:
if(playerVariables[playerid][pGroup] !=7
I also would change the string:

PHP код:
new string[35]; 
to 64, why to 35?

Try this, and then let's see what the rest of the errors are!
Reply
#4

I got an error, Fixed that and then I got these:
Код:
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11962) : warning 202: number of arguments does not match definition
C:\Other Stuff\My SAMP Server\gamemodes\vx-rp.pwn(11975) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Also the error was you mispelt something.
EDIT: This is at the first post.
Reply
#5

These are warnings, btw....

Could you show us the lines?
Reply
#6

I know there warnings:
Код:
            GetPlayerName(playerid, string); // 11962
Код:
    return 1;
Reply
#7

pawn Код:
CMD:mask(playerid, params[]) {

    if(playerVariables[playerid][pGroup] != 7) {
   
        if(isMasked[playerid] == 0) {
       
            new randomID = random(200);
            new string[35];
           
            GetPlayerName(playerid, string, sizeof(string));
            strmid(OldUsername[playerid], string, 0, strlen(string), 64);
            format(string,sizeof(string), "Masked_%d", randomID);
            SetPlayerName(playerid, string);
            SendClientMessage(playerid, COLOR_GREY, "You have put on a mask! (/mask to disable)");
        }
        else return SendClientMessage(playerid, COLOR_GREY, "You do now have the right privillages to use this command.");
   
    }
    else
    {
        SetPlayerName(playerid, OldUsername[playerid]);
        isMasked[playerid] = 1;
        SendClientMessage(playerid, COLOR_GREY, "You have taken off your mask!");
    }
    return true;
}
I had an unneeded return true.

Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 71 seconds.

ZZZZZzzzzzzzzzZZZZZ......
Reply
#8

Eh? Shouldn't it be:

PHP код:
GetPlayerName(playeridstringsizeof(string)); 
And try instead of "return 1;", "return true;". One "return true;" is senseless...

EDIT: He was faster! ;(
Reply
#9

Thanks it worked, REPP You both..
Reply
#10

Okay dude, thanks btw!^^

Test it, and then write again here if it worked or not...

EDIT: I'm a retard...I meant on the server, the CMD...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)