Problem: Pokusavam da implementiram komandu iz jednog gm u moj,medjutim dobijam ove warninge
Deo Skripte:
C:\Users\Niko_Crawford\Desktop\ERP Test Version\gamemodes\larp.pwn(65465) : warning 202: number of arguments does not match definition
C:\Users\Niko_Crawford\Desktop\ERP Test Version\gamemodes\larp.pwn(65465) : warning 202: number of arguments does not match definition
C:\Users\Niko_Crawford\Desktop\ERP Test Version\gamemodes\larp.pwn(65467) : warning 202: number of arguments does not match definition
C:\Users\Niko_Crawford\Desktop\ERP Test Version\gamemodes\larp.pwn(65467) : warning 202: number of arguments does not match definition
C:\Users\Niko_Crawford\Desktop\ERP Test Version\gamemodes\larp.pwn(74878) : warning 202: number of arguments does not match definition
C:\Users\Niko_Crawford\Desktop\ERP Test Version\gamemodes\larp.pwn(74878) : warning 202: number of arguments does not match definition
C:\Users\Niko_Crawford\Desktop\ERP Test Version\gamemodes\larp.pwn(74880) : warning 202: number of arguments does not match definition
C:\Users\Niko_Crawford\Desktop\ERP Test Version\gamemodes\larp.pwn(74880) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
8 Warnings.Evo i sta sam pokusao ubaciti
if(strcmp(cmd, "/shakehand", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /shakehand [playerid/PartOfName] [1-6]");
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /shakehand [playerid/PartOfName] [1-6]");
new snumber = strval(tmp);
if(snumber < 1 || snumber > 6) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /shakehand [playerid/PartOfName] [1-6]");
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(ProxDetectorS(2.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't use this feature on yourself.");
format(string, sizeof(string), "* You offered to shake %s's hand.", GetPlayerName(giveplayerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has offered to shake your hand (type /accept handshake), to accept it.", GetPlayerName(playerid));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
HandshakeOffer = playerid;
HandshakeType = snumber;
}
else SendClientMessage(playerid, COLOR_GREY, "That player must be near you in order to shake their hand.");
}
}
else SendClientMessage(playerid, COLOR_GREY, "The player you are looking for is Offline.");
}
return 1;
}I ovo
else if(strcmp(tmp,"handshake",true) == 0)
{
if(IsPlayerConnected(HandshakeOffer))
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(ProxDetectorS(2.0, playerid, HandshakeOffer))
{
format(string, sizeof(string), "* You have shaken %s's hand.", GetPlayerName(HandshakeOffer));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has accepted the Handshake.", GetPlayerName(playerid));
SendClientMessage(HandshakeOffer, COLOR_LIGHTBLUE, string);
ClearAnimations(playerid);
ClearAnimations(HandshakeOffer);
SetPlayerFacingPlayer(playerid, HandshakeOffer);
SetPlayerFacingPlayer(HandshakeOffer, playerid);
if(HandshakeType == 1)
{
ApplyAnimation(playerid, "GANGS","hndshkaa", 4.0,0,0,0,0,0);
ApplyAnimation(HandshakeOffer,"GANGS","hndshkaa",4.0,0,0,0,0,0);
}
else if(HandshakeType == 2)
{
ApplyAnimation(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0);
ApplyAnimation(HandshakeOffer,"GANGS","hndshkba",4.0,0,0,0,0,0);
}
else if(HandshakeType == 3)
{
ApplyAnimation(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0);
ApplyAnimation(HandshakeOffer,"GANGS","hndshkda",4.0,0,0,0,0,0);
}
else if(HandshakeType == 4)
{
ApplyAnimation(playerid,"GANGS","hndshkea",4.0,0,0,0,0,0);
ApplyAnimation(HandshakeOffer,"GANGS","hndshkea",4.0,0,0,0,0,0);
}
else if(HandshakeType == 5)
{
ApplyAnimation(playerid,"GANGS","hndshkfa",4.0,0,0,0,0,0);
ApplyAnimation(HandshakeOffer,"GANGS","hndshkfa",4.0,0,0,0,0,0);
}
else if(HandshakeType == 6)
{
ApplyAnimation(playerid,"GANGS","prtial_hndshk_biz_01",4.0,0,0,0,0,0);
ApplyAnimation(HandshakeOffer,"GANGS","prtial_hndshk_biz_01",4.0,0,0,0,0,0);
}
HandshakeOffer = INVALID_PLAYER_ID;
HandshakeType = 0;
}
else SendClientMessage(playerid, COLOR_GREY, "You must stay closer to the person you want to shake hands with.");
}
else SendClientMessage(playerid, COLOR_GREY, "You can't perform this action while being in a vehicle.");
}
else SendClientMessage(playerid, COLOR_GREY, "Nobody has offered you to shake hands.");
}Linije na kojima su warninzi:
(65465) & (65465) ista linija
format(string, sizeof(string), "* You offered to shake %s's hand.", GetPlayerName(giveplayerid));(65467) & (65467)
format(string, sizeof(string), "* %s has offered to shake your hand (type /accept handshake), to accept it.", GetPlayerName(playerid));(7487😎 & (7487😎
format(string, sizeof(string), "* You have shaken %s's hand.", GetPlayerName(HandshakeOffer));(74880) & (74880)
format(string, sizeof(string), "* %s has accepted the Handshake.", GetPlayerName(playerid));