SA-MP Forums Archive
CMD: Can you fix the brackets? - 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: CMD: Can you fix the brackets? (/showthread.php?tid=501389)



CMD: Can you fix the brackets? - Gregory00 - 17.03.2014

Someone..?
Код:
CMD:atm(playerid, params[])
{
	if(!IsAtATM(playerid))
	{
	    SendClientMessageEx(playerid, COLOR_GREY, "   You are not at an ATM!");
	    return 1;
	}
	ShowPlayerDialog(playerid,ATMSYSTEM,DIALOG_STYLE_LIST,"ATM System","Withdraw Money\nDeposit Money\nMy Balance\nWiretransfer","Done","Cancel");
	return 1;
	}



Re: CMD: Can you fix the brackets? - ikkentim - 17.03.2014

This piece of code is ok, you probably open a bracket before these lines you never close


Re: CMD: Can you fix the brackets? - PrivatioBoni - 17.03.2014

Having a hard time defining "fix", but if you mean you have a warning of loose indentation, the below should fix this.

pawn Код:
CMD:atm(playerid, params[])
{
    if(!IsAtATM(playerid))
    {
        SendClientMessageEx(playerid, COLOR_GREY, "   You are not at an ATM!");
        return 1;
    }
    ShowPlayerDialog(playerid,ATMSYSTEM,DIALOG_STYLE_LIST,"ATM System","Withdraw Money\nDeposit Money\nMy Balance\nWiretransfer","Done","Cancel");
    return 1;
}



Re: CMD: Can you fix the brackets? - VishvaJeet - 18.03.2014

Код:
CMD:atm(playerid, params[])
{
    if(IsAtATM(playerid))
    ShowPlayerDialog(playerid,ATMSYSTEM,DIALOG_STYLE_LIST,"ATM System","Withdraw Money\nDeposit Money\nMy Balance\nWiretransfer","Done","Cancel");
    else SendClientMessageEx(playerid, COLOR_GREY, "   You are not at an ATM!");
    return 1;
}