Somthing is wrong, but what? (Simple cmd help) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Somthing is wrong, but what? (Simple cmd help) (
/showthread.php?tid=402737)
Somthing is wrong, but what? (Simple cmd help) -
jakejohnsonusa - 27.12.2012
Ok so when I edited my frisk system I get about 5 billion errors and warnings, the type where I know none of them are actually errors, but there is simthing wrong with what I just edited... But what?
Here is the command:
pawn Код:
if(strcmp(cmd,"/friskinv",true)==0 || strcmp(cmd,"/friskinventory",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/friskinv)entory [playerid/PartOfName]");
return 1;
}
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "* You are Banned from Cop Duty!");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(5.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Frisk yourself!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "|__________ %s Inventory __________|", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
for (new i=0; i<12; i++)// Begining of change I made that caused errors.
{
GetPlayerWeaponData(giveplayerid, i, sweapon, sammo);
GetWeaponName(sweapon, gunname, sizeof(gunname));
if(sweapon != 0)
{
format(string, sizeof(string), "Slot %d: %s [ID: %d Ammo: %d]", i, gunname,sweapon, sammo);
SendClientMessage(playerid, COLOR_GREY, string);
}
if(sweapon == 0)
{
SendClientMessage(playerid, COLOR_GREY, "| Weapon Inventory is empty.|");
)
}//End of what I edited that caused errors.
format(string, sizeof(string), " %s has frisked you for anything that could be harmful.", sendername);
SendClientMessage(giveplayerid, COLOR_GREY, string);
return 1;
}
}
}
}
return 1;
}
Re: Somthing is wrong, but what? (Simple cmd help) -
FL3GM4 - 27.12.2012
Give us errors! And lines of errors
Re: Somthing is wrong, but what? (Simple cmd help) -
Chriham3 - 27.12.2012
pawn Код:
if(sweapon == 0)
{
SendClientMessage(playerid, COLOR_GREY, "| Weapon Inventory is empty.|");
)
}//End of what I edited that caused errors.
You did a ) instead of }.
Re: Somthing is wrong, but what? (Simple cmd help) -
jakejohnsonusa - 27.12.2012
Yep, that was it. Thanks!
+ 1 Rep for you