Help Don't Send
#1

Код:
//-------------------------------{Invite CMD By Mayk}-----------------------------------------------//
        if(strcmp(cmd, "/invite", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                tmp = strtok(cmdtext, idx);
                        if(!strlen(tmp))
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "INFO:/invite [ID/Ime na Igrac]");
                            return 1;
                        }
                        giveplayerid = ReturnUser(tmp);
                        if(IsPlayerConnected(giveplayerid))
                        {
                            if(giveplayerid != INVALID_PLAYER_ID)
                            {
                                if(ProxDetectorS(3.0, playerid, giveplayerid))
                                {
                                    if (PlayerInfo[playerid][pLeader] >= 1)
                                                {
                                            GetPlayerNameEx(playerid, sendername, sizeof(sendername));
                                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                                                        ShowPlayerDialog(giveplayerid, 981, DIALOG_STYLE_MSGBOX, "Pokana za vo Org/Banda/Mafija","Jas te pokanuvam da bides moj clen\n-Dokolku prifakjate pritisnete 'Prifakjam'\n-Dokolku odbivate pritisnete 'Odbivam'","Prifakjam","Odbivam");
                                                        Pokana[giveplayerid] = 1;
                                        return 1;
                                }
                                }
                            }
                        }
            }
            return 1;
        }
//---------------------------------------------------------------------------------------------------//
Потоа го ставате Овоа под ОndialogResponse
//====================================================================================================//
            if(dialogid == 981)
                {
            if(response)
                {
                if(listitem == 0)
                {
                new ftext[20];
                if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PD"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
                else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "FBI"; ChosenSkin[playerid] = 24; SetPlayerSkin(playerid, 24); }
                        else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "SWAT"; ChosenSkin[playerid] = 285; SetPlayerSkin(playerid, 285); }
                        else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "MD"; ChosenSkin[playerid] = 71; SetPlayerSkin(playerid, 71); }
                        else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[playerid][pTeam] = 6; gTeam[playerid] = 6; ftext = "Yakuza"; ChosenSkin[playerid] = 121; SetPlayerSkin(playerid, 121); }
                        else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ftext = "LCN"; ChosenSkin[playerid] = 111; SetPlayerSkin(playerid, 111); }
                        else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Vlada"; ChosenSkin[playerid] = 163; SetPlayerSkin(playerid, 163); }
                        else if(PlayerInfo[playerid][pLeader] ==  { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Hitman"; ChosenSkin[playerid] = 20; SetPlayerSkin(playerid, 20); }
                        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Beyond News"; ChosenSkin[playerid] = 171; SetPlayerSkin(playerid, 171); }
                        else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[playerid][pTeam] = 15; gTeam[playerid] = 15; ftext = "Taxi"; ChosenSkin[playerid] = 210; SetPlayerSkin(playerid, 210); }
                        else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "LSG"; ChosenSkin[playerid] = 175; SetPlayerSkin(playerid, 175); }
                else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "GSF"; ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }
                else { }
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[playerid][pMember] = PlayerInfo[playerid][pLeader];
                        PlayerInfo[playerid][pRank] = 1;
                        format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Ja Prifativte ponudata i sega ste vo %s", ftext);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                        format(string, sizeof(string), "{37F906}INFO:{FFFFFF}%s ja prifati ponudata za vlez vo %s.", sendername,ftext);
                        SCM(playerid, BELA, string);
                        Pokana[playerid] = 0;
                        format(string, sizeof(string), "%s ja prifati ponudata za clenstvo.", sendername);
                ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else if(listitem == 1)
                {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SendClientMessage(playerid, COLOR_WHITE,"{37F906}INFO:{FFFFFF}Ja Odbivte ponudata za Clenstvo!");
                        format(string, sizeof(string), "%s ja odbi ponudata za clenstvo.", sendername);
                        ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        Pokana[playerid] = 0;
                }
                }
                }
can some1 help me it gives me dont sent have errors but dont showing just crashing samp
Reply
#2

So Pawn Complier crashes? Missing/not needed bracket?
Reply
#3

yes i think that is the problem but i cant fix the brackets
Reply
#4

Why can't you fix the brackets?
Reply
#5

try this

pawn Код:
if(strcmp(cmd, "/invite", true) == 0)
{
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "INFO:/invite [ID/Ime na Igrac]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(ProxDetectorS(3.0, playerid, giveplayerid))
                    {
                        if(PlayerInfo[playerid][pLeader] >= 1)
                        {
                        GetPlayerNameEx(playerid, sendername, sizeof(sendername));
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        ShowPlayerDialog(giveplayerid, 981, DIALOG_STYLE_MSGBOX, "Pokana za vo Org/Banda/Mafija","Jas te pokanuvam da bides moj clen\n-Dokolku prifakjate pritisnete 'Prifakjam'\n-Dokolku odbivate pritisnete 'Odbivam'","Prifakjam","Odbivam");
                        Pokana[giveplayerid] = 1;
                        }
                    }
                }
            }
        }
        return 1;
}
pawn Код:
if(dialogid == 981)
    {
        if(response)
        {
            if(listitem == 0)
            {
                new ftext[20];
                if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PD"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
                else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "FBI"; ChosenSkin[playerid] = 24; SetPlayerSkin(playerid, 24); }
                else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "SWAT"; ChosenSkin[playerid] = 285; SetPlayerSkin(playerid, 285); }
                else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "MD"; ChosenSkin[playerid] = 71; SetPlayerSkin(playerid, 71); }
                else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[playerid][pTeam] = 6; gTeam[playerid] = 6; ftext = "Yakuza"; ChosenSkin[playerid] = 121; SetPlayerSkin(playerid, 121); }
                else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ftext = "LCN"; ChosenSkin[playerid] = 111; SetPlayerSkin(playerid, 111); }
                else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Vlada"; ChosenSkin[playerid] = 163; SetPlayerSkin(playerid, 163); }
                else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Hitman"; ChosenSkin[playerid] = 20; SetPlayerSkin(playerid, 20); }
                else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Beyond News"; ChosenSkin[playerid] = 171; SetPlayerSkin(playerid, 171); }
                else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[playerid][pTeam] = 15; gTeam[playerid] = 15; ftext = "Taxi"; ChosenSkin[playerid] = 210; SetPlayerSkin(playerid, 210); }
                else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "LSG"; ChosenSkin[playerid] = 175; SetPlayerSkin(playerid, 175); }
                else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "GSF"; ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }
                }else{
                GetPlayerName(playerid, sendername, sizeof(sendername));
                PlayerInfo[playerid][pMember] = PlayerInfo[playerid][pLeader];
                PlayerInfo[playerid][pRank] = 1;
                format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Ja Prifativte ponudata i sega ste vo %s", ftext);
                SendClientMessage(playerid, COLOR_WHITE, string);
                format(string, sizeof(string), "{37F906}INFO:{FFFFFF}%s ja prifati ponudata za vlez vo %s.", sendername,ftext);
                SCM(playerid, BELA, string);
                Pokana[playerid] = 0;
                format(string, sizeof(string), "%s ja prifati ponudata za clenstvo.", sendername);
                ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
               
                if(listitem == 1)
                {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SendClientMessage(playerid, COLOR_WHITE,"{37F906}INFO:{FFFFFF}Ja Odbivte ponudata za Clenstvo!");
                format(string, sizeof(string), "%s ja odbi ponudata za clenstvo.", sendername);
                ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                Pokana[playerid] = 0;
            }
        }
    }
- Edited -
Reply
#6

errors
Quote:

C:\DOCUME~1\EA3B~1\MYDOCU~1\FREAKW~1\GAMEMO~1\FW.p wn(2457) : error 017: undefined symbol "ftext"
C:\DOCUME~1\EA3B~1\MYDOCU~1\FREAKW~1\GAMEMO~1\FW.p wn(2459) : error 017: undefined symbol "ftext"
C:\DOCUME~1\EA3B~1\MYDOCU~1\FREAKW~1\GAMEMO~1\FW.p wn(2460) : error 017: undefined symbol "SCM"
C:\DOCUME~1\EA3B~1\MYDOCU~1\FREAKW~1\GAMEMO~1\FW.p wn(2471) : error 017: undefined symbol "Pokana"
C:\DOCUME~1\EA3B~1\MYDOCU~1\FREAKW~1\GAMEMO~1\FW.p wn(2471) : warning 215: expression has no effect
C:\DOCUME~1\EA3B~1\MYDOCU~1\FREAKW~1\GAMEMO~1\FW.p wn(2471) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\EA3B~1\MYDOCU~1\FREAKW~1\GAMEMO~1\FW.p wn(2471) : error 029: invalid expression, assumed zero
C:\DOCUME~1\EA3B~1\MYDOCU~1\FREAKW~1\GAMEMO~1\FW.p wn(2471) : fatal error 107: too many error messages on one line

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


7 Errors.

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)