cmds problem
#1

here the warning i get

Код:
C:\Users\Home\Desktop\Test server\gamemodes\Testsricpt.pwn(32760) : warning 217: loose indentation
here the cmd

Код:
CMD:help2(playerid, params[])
{
        if(!strlen(params))
		{
		    SendClientMessageEx(playerid, 0xFF8000FF, "/help [section]");
		    return SendClientMessageEx(playerid, 0xFF8000FF, "(Sections: General - Chat - Car - Gun - Faction - Job)");
		}
		if(strcmp(params,"general",true) == 0)
        {
                SendClientMessageEx(playerid,COLOR_YELLOW,"--General Commands--");
                SendClientMessageEx(playerid, COLOR_WHITE,"*** ACCOUNT *** /rules /faq /stats /inventory /myguns /buylevel /upgrade /changepass");
                SendClientMessageEx(playerid, COLOR_WHITE,"*** CHAT *** /w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertise) /f(amily) /me");
                SendClientMessageEx(playerid, COLOR_WHITE,"*** BANK *** /balance /withdraw /deposit /wiretransfer /abalance /awithdraw /adeposit /awiretransfer");
                SendClientMessageEx(playerid, COLOR_WHITE,"*** GENERAL *** /pay /writecheck /cashchecks /charity /time /buy /id /music /showlicenses /clothes /mywarrants");
                SendClientMessageEx(playerid, COLOR_WHITE,"*** GENERAL *** /lock /skill /stopani /do /me /kill /buyclothes /droplicense /calculate /refill /car /seatbelt /checkbelt");
                SendClientMessageEx(playerid, COLOR_WHITE,"*** GENERAL *** /cancel /accept /eject /usecrack /contract /service /families /checkweed");
                return 1;
        }
        else if(strcmp(params,"chat",true) == 0)
        {
                SendClientMessageEx(playerid,COLOR_YELLOW,"--Chat Commands--");
                SendClientMessageEx(playerid, COLOR_WHITE,":: CHAT :: (/o)oc /me /(ad)vertise (/cw)hisper (/s)hout /(w)hisper (/b) /(l)ocal (/f)action /me /do /togfam /togpm /togphone");
                return 1;
        }
        else if(strcmp(params,"car",true) == 0)
        {
                SendClientMessageEx(playerid,COLOR_YELLOW,"--Car Commands--");
                SendClientMessageEx(playerid, COLOR_WHITE,":: CAR :: /car");
                return 1;
        }
        else if(strcmp(params,"gun",true) == 0)
        {
                SendClientMessageEx(playerid,COLOR_YELLOW,"--Gun Commands--");
                SendClientMessageEx(playerid, COLOR_GRAD3,":: Weapon :: /dgun /pgun /buygun (in ammunation)");
                return 1;
        }
        else if(strcmp(params,"faction",true) == 0)
        {
                SendClientMessageEx(playerid,COLOR_YELLOW,"--Faction Help--");
                if(PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 14)
                {
                        SendClientMessageEx(playerid, COLOR_YELLOW2, ":: Gang :: (/r)adio (/jap)aneese /security");
                }
                if(PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember] == 15)
                {
                        SendClientMessageEx(playerid, COLOR_YELLOW2, ":: Gang :: (/r)adio (/rus)sian /security");
                }
                if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
                {
                       SendClientMessageEx(playerid, COLOR_YELLOW2, ":: Gang :: (/r)adio (/spa)nish /security ");
                }
                if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6)
                {
                        SendClientMessageEx(playerid, COLOR_YELLOW2, ":: Gang :: eopen /tuningopen (/r)adio /italian /security");
                }
                if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
                {
                        SendClientMessageEx(playerid,COLOR_YELLOW2,":: HITMAN :: /portable /Hitmenopen");
                }
                if(PlayerInfo[playerid][pMember] == 11||PlayerInfo[playerid][pLeader] == 11)
                {
                        SendClientMessageEx(playerid,COLOR_YELLOW2,":: LESSON :: /startlesson /stoplesson /givelicense");
                }
                return 1;
        }
        else if(strcmp(params,"job",true) == 0)
        {
                if(PlayerInfo[playerid][pJob] == 1) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Detective:: /find"); }
                else if(PlayerInfo[playerid][pJob] == 2) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Lawyer :: /free"); }
                else if(PlayerInfo[playerid][pJob] == 3) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Whore :: /sex"); }
                else if(PlayerInfo[playerid][pJob] == 4) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Drug Dealer :: /selldrugs /get drugs"); }
                else if(PlayerInfo[playerid][pJob] == 5) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Drug Dealer :: /dropcar"); }
                else if(PlayerInfo[playerid][pJob] == 6) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Waiter :: /showmenu /cookuniform"); }
                else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - News Reporter :: /paper /papers /live /news [text]"); }
                else if(PlayerInfo[playerid][pJob] == 7) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Mechanic :: /repair /refill /duty /tow"); }
                else if(PlayerInfo[playerid][pJob] == 8) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Bodyguard :: /guard"); }
                else if(PlayerInfo[playerid][pJob] == 10) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Car Dealer :: /sellcar"); }
                //else if(PlayerInfo[playerid][pJob] == 11) {
                //SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Stuntman :: /startstunt /stopstunt"); }
                else if(PlayerInfo[playerid][pJob] == 12) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Boxer :: /fight /boxstats"); }
                else if(PlayerInfo[playerid][pJob] == 13 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Taxi Driver :: /fare "); }
                else if(PlayerInfo[playerid][pJob] == 14) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Bus Driver:: /fare"); }
                else if(PlayerInfo[playerid][pJob] == 15) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Paper Boy :: /papers /bring /deliver"); }
                else if(PlayerInfo[playerid][pJob] == 16) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Trucker :: /buyprods /sellprods /load"); }
                else if(PlayerInfo[playerid][pJob] == 17) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Pizza Boy :: /duty /sellpizza"); }
                else if(PlayerInfo[playerid][pJob] == 18) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Farmer :: /startharvest /stopharvest"); }
                else if(PlayerInfo[playerid][pJob] == 19) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Illegal Farmer :: /startdrugharvest /stopdrugharvest"); }
                else if(PlayerInfo[playerid][pJob] == 20) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Drugs Smuggler :: /smuggledrugs /selldrugsto"); }
                else if(PlayerInfo[playerid][pJob] == 21) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Street Sweeper :: /startsweep /stopsweep"); }
                else if(PlayerInfo[playerid][pJob] == 22) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Materials Smuggler :: /smugglemats /sellmats"); }
                else if(PlayerInfo[playerid][pJob] == 23) {
                SendClientMessage(playerid,COLOR_YELLOW2,":: JOB - Arms Dealer:: /creategun /buymats"); }
	}
	return 1;
}
Reply
#2

this is how indenting is...
pawn Код:
if()
{
    //4 spaces or 1 tab
    if()
    {
        //8 spaces or 2 tabs
        if()
        {
            //12 spaces or 3 tabs
        }
    }
}
etc....that's the problem with yours...im sure you can fix it yourself
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)