Easy to fix - 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: Easy to fix (
/showthread.php?tid=557807)
Easy to fix -
Glossy42O - 15.01.2015
I know i did something wrong here but i got no idea what..
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == drules)
{
if(!response) return Kick(playerid);
}
return 1;
}
return 1;//that line
}
error 010: invalid function or declaration
And here..
PHP код:
CMD:rules(playerid,params[])
{
ShowPlayerDialog(playerid, 2345, drules,DIALOG_STYLE_MSGBOX, "Rules of the server", "No racism\nNo car parking/ramming on players\nNo hacking\nInsulting is not allowed\nBe nice\nRespect admins\nNEVER abuse bugs if you found one report on forums\nFor all the rules visit our forums. /site", "Agree", "I don't agree");
return 1;
}
error 035: argument type mismatch (argument 4)
and yes i did define drules. #define drules 2345
Re: Easy to fix -
CalvinC - 15.01.2015
For the first one, i don't think you need to return 1 twice.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == drules)
{
if(!response) return Kick(playerid);
}
}
return 1;
}
And i guess you meant the second to be this:
pawn Код:
CMD:rules(playerid,params[])
{
ShowPlayerDialog(playerid, 2345, DIALOG_STYLE_MSGBOX, "Rules of the server", "No racism\nNo car parking/ramming on players\nNo hacking\nInsulting is not allowed\nBe nice\nRespect admins\nNEVER abuse bugs if you found one report on forums\nFor all the rules visit our forums. /site", "Agree", "I don't agree");
return 1;
}
Re: Easy to fix -
Glossy42O - 15.01.2015
FIXED.
Re: Easy to fix -
HY - 15.01.2015
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == drules)
{
if(response)
{
// Code, if press Yes,
}
else
{
Kick(playerid);
}
}
return 1;
}
EDIT: Didn't saw you edited your comment and fixed.