Compiler quits responding - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Compiler quits responding (
/showthread.php?tid=228852)
Compiler quits responding -
DeltaAirlines12 - 20.02.2011
I've just made a simple /myweps command, which will get the player's weapon's, their name, and ammo, and return each one like:
Weapon: M4 Ammo: 29
But the compiler stops work anyone know why?
pawn Код:
COMMAND:myweapons(playerid, params[])
{
    new weapons[13][2], string[150];
    for (new i = 0; i < 13; i++)
    {
      GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
    }
    GetWeaponName(playerid,weapons,sizeof(weapons));
    format(string,sizeof(string),"Weapon Name: %s Ammo: %d", weapons[i][0], weapons[i][1]);
    SendClientMessage(playerid, COLOR_GREY,string);
    return 1;
}
Re: Compiler quits responding -
xRyder - 20.02.2011
Why the hell did you make this for:
pawn Код:
GetPlayerName(playerid,weapons[i][0],weapons[i][1]);
?
That will do nothing.
Re: Compiler quits responding -
DeltaAirlines12 - 20.02.2011
Woops, fixed that and tried to compile, still not working...
Re: Compiler quits responding -
Marricio - 20.02.2011
pawn Код:
COMMAND:myweapons(playerid, params[])
{
    new weapons[13][2], string[150];
    for (new i = 0; i < 13; i++)
    {
      GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
      GetWeaponName(playerid,weapons,sizeof(weapons));
      format(string,sizeof(string),"Weapon Name: %s Ammo: %d", weapons[i][0], weapons[i][1]);
      SendClientMessage(playerid, COLOR_GREY,string);
      return 1;
}