Jump to content
  • 0

Sprijin-Erori la comanda /war


NaturaL

Question

Nick: Natural

Problema: imi da 4 erori la comanda /war

Erori / warnings: [pawn]C:\Documents and Settings\Ciprian\Desktop\gamemode's\BloWn GM\filterscripts\sistemwar.pwn(37) : error 012: invalid function call, not a valid address

C:\Documents and Settings\Ciprian\Desktop\gamemode's\BloWn GM\filterscripts\sistemwar.pwn(37) : warning 215: expression has no effect

C:\Documents and Settings\Ciprian\Desktop\gamemode's\BloWn GM\filterscripts\sistemwar.pwn(37) : error 001: expected token: ";", but found ")"

C:\Documents and Settings\Ciprian\Desktop\gamemode's\BloWn GM\filterscripts\sistemwar.pwn(37) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Ciprian\Desktop\gamemode's\BloWn GM\filterscripts\sistemwar.pwn(37) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

[/pawn]

Lini/script: [pawn]public OnPlayerCommandText(playerid, cmdtext[])

{

new cmd[256];

if(strcmp(cmd, "/war", true) == 0)

{

    if(IsAMafia(playerid))

    {

        GetPlayer2DRadarZone(playerid, zone, sizeof(zone));

       

        //gettime(rhour, rminute, rsecond);

        //if(rhour < 6) return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}War: {FFFFFF}You can't start a war that late!");

       

        new side[MAX_PLAYERS], ncount=0;

if(PlayerInfo[playerid][pLeader] != 0) side[playerid] = PlayerInfo[playerid][pLeader]; else if(PlayerInfo[playerid][pMember] != 0) side[playerid] = PlayerInfo[playerid][pMember];

        for(new n=1; n<sizeof(GangInfo); n++)

        {

            if(GangInfo[n][gFaction] == side[playerid]) ncount++;

        }

        if(PlayerInfo[playerid][pRank] >= 5) {} else return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}War: {FFFFFF}Nu ai rank-ul necesar!");

if(ncount >= 6) return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}War: {FFFFFF}Ai deja 6 teritorii!");

        if(GetPlayerInterior(playerid) != 0) return 1;

        if(War != 0) return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}War: {FFFFFF}Exista deja un war!");

        new ward;

        if(Warallowed == 0) return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}War: {FFFFFF}Un admin a oprit war-urile!");

        GetPlayerName(playerid, sendername, sizeof(sendername));

if(IsPlayerInArea(playerid, 2335.575, 2522.421, -2685.911, -2405.642)) ward = 1;

else if(IsPlayerInArea(playerid, 2639.2, 2872.757, -2580.811, -2323.897)) ward = 2;

else if(IsPlayerInArea(playerid, 2323.897, 2545.777, -128.4566, 233.5575)) ward = 3;

else if(IsPlayerInArea(playerid, 2125.373, 2312.219, -116.7788, 221.8796)) ward = 4;

else if(IsPlayerInArea(playerid, 1144.432, 1448.057, 105.1009, 467.115)) ward = 5;

else if(IsPlayerInArea(playerid, 688.9946, 840.807, -677.3168, -408.7256)) ward = 6;

else if(IsPlayerInArea(playerid, 572.2159, 688.9946, -665.6389, -420.4035)) ward = 7;

else if(PlayerToPoint(160.0, playerid, 244.5219,-126.7156,1.8419)) ward = 8;

else if(IsPlayerInArea(playerid, -653.961, -362.0141, -245.2354, 163.4902)) ward = 9;

else if(IsPlayerInArea(playerid, -221.8796, 163.4902, -443.7593, -221.8796)) ward = 10;

else if(IsPlayerInArea(playerid, -653.961, -443.7593, -560.538, -443.7593)) ward = 11;

else if(IsPlayerInArea(playerid, -1132.754, -934.23, -770.7397, -583.8938)) ward = 12;

else if(IsPlayerInArea(playerid, -2300.542, -1973.561, -2569.133, -2230.474)) ward = 13;

else if(IsPlayerInArea(playerid, -2137.051, -1891.816, -1015.975, -712.3504)) ward = 14;

else if(IsPlayerInArea(playerid, -221.8796, 58.38938, -140.1345, 151.8124)) ward = 15;

else if(IsPlayerInArea(playerid, -2639.2, -2195.441, 2183.763, 2522.421)) ward = 16;

else if(IsPlayerInArea(playerid, -385.3699, 116.7788, 1015.975, 1249.533)) ward = 17;

else if(IsPlayerInArea(playerid, -1646.58, -1331.278, 2464.032, 2744.301)) ward = 18;

else return 1;

format(string, sizeof(string), "{0099FF}War: {FFFFFF}Acest teritoriu a fost deja ocupat acum %d ore.", GangInfo[ward][gHours]);

if(GangInfo[ward][gHours] > 0 && AdminDuty[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, string);

        //if(PlayerInfo[playerid][pLeader] >= 1) {} else return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}War: {FFFFFF}Trebuie sa fii liderul unei mafie!");

        new ftext[60], ftext1[60];

        if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) format(ftext, sizeof(ftext), "{5F361E}Dallas Crime Family{FFFFFF}");

        if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) format(ftext, sizeof(ftext), "{C8C1BF}Mafia Leone{FFFFFF}");

        if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) format(ftext, sizeof(ftext), "{7716A0}Diablos{FFFFFF}");

        if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) format(ftext, sizeof(ftext), "{D4AA1E}The Crips{FFFFFF}");

        if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) format(ftext, sizeof(ftext), "{17B41F}Uptown Riders{FFFFFF}");

        if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) format(ftext, sizeof(ftext), "{1CCDB5}Scaletta Famiglia{FFFFFF}");

        if(GangInfo[ward][gFaction] == 11) format(ftext1, sizeof(ftext1), "{5F361E}Clanul Sadoveanu{FFFFFF}");

        if(GangInfo[ward][gFaction] == 12) format(ftext1, sizeof(ftext1), "{C8C1BF}Clanul Capone{FFFFFF}");

        if(GangInfo[ward][gFaction] == 13) format(ftext1, sizeof(ftext1), "{7716A0}Clanul Duduianu{FFFFFF}");

        if(GangInfo[ward][gFaction] == 14) format(ftext1, sizeof(ftext1), "{D4AA1E}Clanul Corsicanu{FFFFFF}");

        if(GangInfo[ward][gFaction] == 15) format(ftext1, sizeof(ftext1), "{17B41F}Clanul Tobosaru{FFFFFF}");

        if(GangInfo[ward][gFaction] == 16) format(ftext1, sizeof(ftext1), "{1CCDB5}Clanul Camataru{FFFFFF}");

        if(IsAAAlliance(playerid) && GangInfo[ward][gFaction] == 11 || IsAAAlliance(playerid) && GangInfo[ward][gFaction] == 15 || IsAAAlliance(playerid) && GangInfo[ward][gFaction] == 14)

return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}War: {FFFFFF}Alianta ta detine acest teritoriu!");

  if(IsAIAlliance(playerid) && GangInfo[ward][gFaction] == 12 || IsAIAlliance(playerid) && GangInfo[ward][gFaction] == 13 || IsAIAlliance(playerid) && GangInfo[ward][gFaction] == 16)

return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}War: {FFFFFF}Alianta ta detine acest teritoriu!");

        format(string, sizeof(string), "(( CsForce News: )) %s a inceput un razboi cu %s!", ftext, ftext1);

        BroadCast(0x8D8DFFFF,string);

        format(string, sizeof(string), "(( CsForce News: )) {FFFFFF}Razboiul se desfasoara la %s! Evitati acea zona!", zone);

        BroadCast(0x8D8DFFFF,string);

        if(IsPlayerInArea(playerid, 2335.575, 2522.421, -2685.911, -2405.642)) GangZoneFlashForAll(Gangzone[0], 0xFF6347AA);

else if(IsPlayerInArea(playerid, 2639.2, 2872.757, -2580.811, -2323.897))  GangZoneFlashForAll(Gangzone[1], 0xFF6347AA);

else if(IsPlayerInArea(playerid, 2323.897, 2545.777, -128.4566, 233.5575))  GangZoneFlashForAll(Gangzone[2], 0xFF6347AA);

else if(IsPlayerInArea(playerid, 2125.373, 2312.219, -116.7788, 221.8796))  GangZoneFlashForAll(Gangzone[3], 0xFF6347AA);

else if(IsPlayerInArea(playerid, 1144.432, 1448.057, 105.1009, 467.115))  GangZoneFlashForAll(Gangzone[4], 0xFF6347AA);

else if(IsPlayerInArea(playerid, 688.9946, 840.807, -677.3168, -408.7256))  GangZoneFlashForAll(Gangzone[5], 0xFF6347AA);

else if(IsPlayerInArea(playerid, 572.2159, 688.9946, -665.6389, -420.4035))  GangZoneFlashForAll(Gangzone[6], 0xFF6347AA);

else if(IsPlayerInArea(playerid, 93.423, 397.0478, -291.9469, 70.06725))  GangZoneFlashForAll(Gangzone[7], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -653.961, -362.0141, -245.2354, 163.4902)) GangZoneFlashForAll(Gangzone[8], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -221.8796, 163.4902, -443.7593, -221.8796)) GangZoneFlashForAll(Gangzone[9], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -653.961, -443.7593, -560.538, -443.7593)) GangZoneFlashForAll(Gangzone[10], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -1132.754, -934.23, -770.7397, -583.8938)) GangZoneFlashForAll(Gangzone[11], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -2300.542, -1973.561, -2569.133, -2230.474)) GangZoneFlashForAll(Gangzone[12], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -2137.051, -1891.816, -1015.975, -712.3504)) GangZoneFlashForAll(Gangzone[13], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -221.8796, 58.38938, -140.1345, 151.8124)) GangZoneFlashForAll(Gangzone[14], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -2639.2, -2195.441, 2183.763, 2522.421)) GangZoneFlashForAll(Gangzone[15], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -385.3699, 116.7788, 1015.975, 1249.533)) GangZoneFlashForAll(Gangzone[16], 0xFF6347AA);

else if(IsPlayerInArea(playerid, -1646.58, -1331.278, 2464.032, 2744.301)) GangZoneFlashForAll(Gangzone[17], 0xFF6347AA);

        WarStarted=1;

        WarF = side[playerid];

        WarF1 = GangInfo[ward][gFaction];

       

        WarZone = ward;

       

        for(new w = 0; w < sizeof(GangInfo); w++)

        {

            WarPoints[w] = 0;

}

        if(side[playerid] == 11 || side[playerid] == 14 || side[playerid] == 15) WarAttack1 = 1; else WarAttack1 = 2;

        if(GangInfo[ward][gFaction] == 11 || GangInfo[ward][gFaction] == 14 || GangInfo[ward][gFaction] == 15) WarAttack2 = 1; else WarAttack2 = 2;

       

if(IsAIAlliance(playerid)) War = 1; else if(IsAAAlliance(playerid)) War = 2;

//if(GangInfo[ward][gFaction] == 5 || GangInfo[ward][gFaction] == 13 || GangInfo[ward][gFaction] == 14) War1 = 2; else if(GangInfo[ward][gFaction] == 6 || GangInfo[ward][gFaction] == 12 || GangInfo[ward][gFaction] == 15) War1 = 1;

WarMan1 = 999;

WarMan2 = 999;

WarScore1 = 0;

WarScore2 = 0;

for(new i=0; i<MAX_PLAYERS; i++)

        {

            WarStats1 = 0;

            WarStats2 = 0;

            if(IsAIAlliance(i) || IsAAAlliance(i))

            {

                format(string, sizeof(string), "{DC0C0C}War: {FFFFFF}%s din %s a declansat un razboi! Pentru a castiga razboiul, trebuie sa faceti un scor mai bun in 15 minute!", sendername, ftext);

                SendClientMessage(i, COLOR_WHITE, string);

            }

        }

    }

}[/pawn]

Ai incercat sa rezolvi singur ?: Am cautat pe internet dar fara folos

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

In primul rand [pawn]if(strcmp(cmd, "/war", true) == 0)[/pawn] nu e asa ... [pawn]if(strcmp(cmdtext, "/war", true) == 0)[/pawn].

Iar IsAMafia trebuie sa fie o functie care verifica daca playerul este in Mafie. PlayerInfo trebuie sa fie un enum ...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.