number of arguments does not match definition
#1

Here is my error

PHP код:
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(22887) : warning 202number of arguments does not match definition
C
:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(22991) : warning 219local variable "pTame" shadows a variable at a preceding level
C
:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(22990) : warning 204symbol is assigned a value that is never used"string"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(22981) : warning 204symbol is assigned a value that is never used"playername"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(22981) : warning 204symbol is assigned a value that is never used"pTame"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"Listening"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"Roadblock"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"Song"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"bandanatext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"captext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"gEdit"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"gEditID"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"glassestext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"hattext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"helmettext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"masktext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"tip"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"tips"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"viewing"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26795) : warning 203symbol is never used"watchtext"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
Header size
:          15108 bytes
Code size
:          1451796 bytes
Data size
:          2095080 bytes
Stack
/heap size:      16384 bytesestimated maxusage=25068 cells (100272 bytes)
Total requirements3578368 bytes
20 Warnings

Error 1 Line:

PHP код:
    (22887)SendAllFormattedText(COLOR_YELLOW"%s has been unjailed early by Admin."giveplayer); 
Error 2 Line:

PHP код:
(22991)new pName[24], pTame[24]; 
Error 3 Line:

PHP код:
(22990)new string[128]; 
Error 4 Line:

PHP код:
(22981)new giveplayeridtargetidpTame[25], playername[25], stringg[80]; 
Error 5 Line:

PHP код:
(22981)new giveplayeridtargetidpTame[25], playername[25], stringg[80]; 
Error 6 Line:

There is no 26795 lines it ends untill 2694
Reply
#2

Error 1: Show us how is SendAllFormattedText defined. Is it a function, a macro?
Error 2: You have probably a global variable named pTame. Rename the one where error is shown, or rename the global one
Error 3 and the rest: As the compiler is saying - you have variables which are not used, or you are assigning value but never using it - that's not an error, just a warning. Delete them, or comment out.
Reply
#3

Error 1:

PHP код:
CMD:aunjail(playeridparams[])
{
    new 
giveplayeridgiveplayer[25], playername[25];
    if (
adlvl[playerid] < 3) return 0;
    if (
sscanf(params"u"giveplayerid)) return SendClientMessage2(playeridCOLOR_ORANGE"Usage: /aunjail [playerid]");
    if (!
IsPlayerConnected2(giveplayerid)) return SendClientMessage2(playeridCOLOR_RED"Error: Inactive player id!");
    
GetPlayerName(giveplayeridgiveplayerMAX_PLAYER_NAME);
    if (
jailedtime[giveplayerid] == 0) return SendPlayerFormattedText(playeridCOLOR_RED"Error: %s isn't in jail!"giveplayer"");
    
jailedtime[giveplayerid] = 0;
    
dini_Unset(AddDirFile(dir_userfilesgiveplayer), "jailtime");
    
dini_Unset(AddDirFile(dir_userfilesgiveplayer), "jailloc");
    
SetPlayerInterior(giveplayerid0);
    
SetPlayerVirtualWorld2(giveplayerid0);
    
SetPlayerPos(giveplayeridwspawns[dspawn[giveplayerid]][0], wspawns[dspawn[giveplayerid]][1], wspawns[dspawn[giveplayerid]][2] + 1.0);
    
SetPlayerFacingAngle(giveplayeridwspawns[dspawn[giveplayerid]][3]);
    
SetCameraBehindPlayer(giveplayerid);
    
TogglePlayerControllable(giveplayerid1);
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    
SendAllFormattedText(COLOR_YELLOW"%s has been unjailed early by Admin."giveplayer);
    
printf("[unjail] %s has been unjailed early by Admin."giveplayer);
    return 
1;

Error 2:

PHP код:
CMD:explode(playeridparams[])
{
      {
      new 
giveplayeridtargetidpTame[25], playername[25], stringg[80];
    if (
adlvl[playerid] < 2) return 0;
      if(
sscanf(params"uz"targetid)) return SendClientMessage(playerid0xFFFFFFFF"USAGE: [PlayerID/PartOfName]");
      if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid0xFFFFFFFF"Player not connected!");
      else
        {
            new 
Float:SLXFloat:SLYFloat:SLZ;
            
GetPlayerPos(targetidSLXSLY,SLZ);
            
CreateExplosion(SLXSLYSLZ110.25);
            new 
string[128];
            new 
pName[24], pTame[24];
            
GetPlayerName(playerid,pName,24);
            
GetPlayerName(targetid,pTame,24);
            
SendClientMessage(giveplayeridCOLOR_ORANGE,"You has been exploded by An Admin.");
            
format(stringg,sizeof(stringg),"You have exploded %s."pTame);
            
SendClientMessage(playeridCOLOR_YELLOW,stringg);
        }
    }
      return 
1;

Error 3:

Gonna remove them
Reply
#4

1. I asked about code of SendAllFormatedText, not where error is.
2. Compare my code to yours and learn not to commit the same mistakes again
pawn Код:
CMD:explode(playerid, params[])
{  
    new targetid, string[80], pName[24], pTame[24];
    if (adlvl[playerid] < 2) return 0;
    if(sscanf(params, "uz", targetid)) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: [PlayerID/PartOfName]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Player not connected!");

    new Float:SLX, Float:SLY, Float:SLZ;
    GetPlayerPos(targetid, SLX, SLY,SLZ);
    CreateExplosion(SLX, SLY, SLZ, 11, 0.25);
    GetPlayerName(playerid,pName,24);
    GetPlayerName(targetid,pTame,24);
    SendClientMessage(targetid, COLOR_ORANGE,"You has been exploded by An Admin.");
    format(string,sizeof(string),"You have exploded %s.", pTame);
   
    return SendClientMessage(playerid, COLOR_YELLOW,string);
}
Reply
#5

I removed all defines but im still getting the error::

PHP код:
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(22879) : warning 202number of arguments does not match definition
C
:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"bandanatext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"captext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"glassestext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"hattext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"helmettext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"masktext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"watchtext"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
Header size
:          15108 bytes
Code size
:          1451676 bytes
Data size
:          2095080 bytes
Stack
/heap size:      16384 bytesestimated maxusage=25068 cells (100272 bytes)
Total requirements3578248 bytes
8 Warnings

Reply
#6

Quote:
Originally Posted by Immortal99
Посмотреть сообщение
I removed all defines but im still getting the error::

PHP код:
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(22879) : warning 202number of arguments does not match definition
C
:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"bandanatext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"captext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"glassestext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"hattext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"helmettext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"masktext"
C:\Users\xavie\Desktop\Elite Mist Gaming\gamemodes\EliteMistGaming.pwn(26782) : warning 203symbol is never used"watchtext"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
Header size
:          15108 bytes
Code size
:          1451676 bytes
Data size
:          2095080 bytes
Stack
/heap size:      16384 bytesestimated maxusage=25068 cells (100272 bytes)
Total requirements3578248 bytes
8 Warnings

Same, remove them or use them
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)