SA-MP Forums Archive
error 010: invalid function or declaration - 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: error 010: invalid function or declaration (/showthread.php?tid=600870)



error 010: invalid function or declaration - Pearson - 14.02.2016

Why Is Here This Error?
CMD:buyskin(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 207.6219, -104.1593, 1005.257)
{
ShowPlayerDialog(playerid,55,DIALOG_STYLE_INPUT,"S KIN SHOP","Chaweret Skinis ID Romelic Gindat Rom Iyidot. | FASI: $500","Yidva","Gasvla");
}
else
{
SendClientMessage(playerid,0xAA3333AA,"Shen Ar Xar Tansacmlis Magaziashi!");
}
}
return 0;
}


Re: error 010: invalid function or declaration - Crayder - 14.02.2016

Extra closing bracket.

Not sure what your indentation is like since you didn't use bbcode code, but I bet you would've noticed instantly if you had your indentation right.

pawn Код:
CMD:buyskin(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 207.6219, -104.1593, 1005.257)
    {
        ShowPlayerDialog(playerid,55,DIALOG_STYLE_INPUT,"S KIN SHOP","Chaweret Skinis ID Romelic Gindat Rom Iyidot. | FASI: $500","Yidva","Gasvla");
    }
    else
    {
        SendClientMessage(playerid,0xAA3333AA,"Shen Ar Xar Tansacmlis Magaziashi!");
    }
    return 0;
}
Also, why are you returning 0? That's gonna result in an "Unknown Command" message every time someone uses the command.


Re: error 010: invalid function or declaration - ManGoe - 14.02.2016

Must be like:-
pawn Код:
CMD:buyskin(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 207.6219, -104.1593, 1005.257)
    {
        ShowPlayerDialog(playerid,55,DIALOG_STYLE_INPUT,"S KIN SHOP","Chaweret Skinis ID Romelic Gindat Rom Iyidot. | FASI: $500","Yidva","Gasvla");
    }
    else
    {
        SendClientMessage(playerid,0xAA3333AA,"Shen Ar Xar Tansacmlis Magaziashi!");
    }
    return 0;
}



Re: error 010: invalid function or declaration - FreAkeD - 14.02.2016

Quote:
Originally Posted by ManGoe
Посмотреть сообщение
Must be like:-
pawn Код:
CMD:buyskin(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 207.6219, -104.1593, 1005.257)
    {
        ShowPlayerDialog(playerid,55,DIALOG_STYLE_INPUT,"S KIN SHOP","Chaweret Skinis ID Romelic Gindat Rom Iyidot. | FASI: $500","Yidva","Gasvla");
    }
    else
    {
        SendClientMessage(playerid,0xAA3333AA,"Shen Ar Xar Tansacmlis Magaziashi!");
    }
    return 0;
}
Why did you have to exactly copy what Crayder posted already before?


Re: error 010: invalid function or declaration - Crayder - 14.02.2016

Quote:
Originally Posted by FreAkeD
Посмотреть сообщение
Why did you have to exactly copy what Crayder posted already before?
Right, it's literally exactly the same...