[HELP] Rules Dialog errors
#1

i did something wrong? (i think 100% yes)
pawn Код:
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(24) : error 025: function heading differs from prototype
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(24) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(26) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(28) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(32) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(37) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(39) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.
here is the code
pawn Код:
#include <a_samp>

#define FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" dialog");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Rules", "(IMPORTANT!!: ONLY ENGLISH IN CHAT!) 1.Cheating and hacking - Permban 2.Write on the forum if you want help! 3.Race on LS only 4.Respect The Administrators and the moderators! 5.Report asap if you see glitch/bug/cheaters/hackers!", "Continue", "Quit");
        return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
          SendClientMessage(playerid,0x008000FF, "Enjoy your stay!");
        }
        else
        {
          SendClientMessage(playerid, 0xFF0000FF, "You don't want to follow the rules! Goodbye");
          Kick(playerid);
        }
        return 1;
    }
    return 0;
}
Reply
#2

Try removing
return 0;
from the bottom!
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
          SendClientMessage(playerid,0x008000FF, "Enjoy your stay!");
        }
        else
        {
          SendClientMessage(playerid, 0xFF0000FF, "You don't want to follow the rules! Goodbye");
          Kick(playerid);
        }
        return 1;
    }
 }
Reply
#3

Quote:
Originally Posted by jonnyboy
Посмотреть сообщение
i did something wrong? (i think 100% yes)
pawn Код:
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(24) : error 025: function heading differs from prototype
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(24) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(26) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(28) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(32) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(37) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(39) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.
here is the code
pawn Код:
#include <a_samp>

#define FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" dialog");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Rules", "(IMPORTANT!!: ONLY ENGLISH IN CHAT!) 1.Cheating and hacking - Permban 2.Write on the forum if you want help! 3.Race on LS only 4.Respect The Administrators and the moderators! 5.Report asap if you see glitch/bug/cheaters/hackers!", "Continue", "Quit");
        return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
          SendClientMessage(playerid,0x008000FF, "Enjoy your stay!");
        }
        else
        {
          SendClientMessage(playerid, 0xFF0000FF, "You don't want to follow the rules! Goodbye");
          Kick(playerid);
        }
        return 1;
    }
    return 0;
}
You didn't do anything wrong, but ye return 1 instead of 0

and btw, either way, i compiled and worked fine. Download the new samp package ( www.sa-mp.com/download.php)

and open PAWNO.exe > File > Open > this script

and compile
Reply
#4

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
You didn't do anything wrong, but ye return 1 instead of 0

and btw, either way, i compiled and worked fine. Download the new samp package ( www.sa-mp.com/download.php)

and open PAWNO.exe > File > Open > this script

and compile
i can't makie it work i tested to make it return 1;
Код:
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(24) : error 025: function heading differs from prototype
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(24) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(26) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(28) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(32) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(37) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(39) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
and when i removed it

Код:
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(24) : error 025: function heading differs from prototype
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(24) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(26) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(28) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(32) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(37) : error 010: invalid function or declaration
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(40) : error 054: unmatched closing brace ("}")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Reply
#5

i rechanged a bit to this:

pawn Код:
#include <a_samp>

#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" dialog");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX,"Rules","1.Cheating and hacking - Permban\n2.Write on the forum if you want help!\nhttp://freeroam-samp.ucoz.com/forum\n3.Race on LS only\n4.Respect The Administrators and the moderators!\n5.Report asap if you see glitch/bug/cheaters/hackers!","Agree","Deny");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 100)
    {
        if(response)
        {
            SendClientMessageToAll(COLOR_YELLOW,"thx for accept rules");
        }
        else if(response == 0)
        {
            SendClientMessageToAll(COLOR_YELLOW,"you have not accept the rules kick");
            Kick(playerid);
        }
    }
    return 1;
}
and i got 1 error

Код:
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(19) : error 021: symbol already defined: "ShowPlayerDialog"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

put
this
ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX, "Rules","1.Cheating and hacking - Permban\n2.Write on the forum if you want help!\nhttp://freeroam-samp.ucoz.com/forum\n3.Race on LS only\n4.Respect The Administrators and the moderators!\n5.Report asap if you see glitch/bug/cheaters/hackers!","Agree","Deny");
to onplayerconnect
Reply
#7

Quote:
Originally Posted by [ISS]jumbo
Посмотреть сообщение
put
this
ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX, "Rules","1.Cheating and hacking - Permban\n2.Write on the forum if you want help!\nhttp://freeroam-samp.ucoz.com/forum\n3.Race on LS only\n4.Respect The Administrators and the moderators!\n5.Report asap if you see glitch/bug/cheaters/hackers!","Agree","Deny");
to onplayerconnect
ok, i give it a try
Reply
#8

Quote:
Originally Posted by [ISS]jumbo
Посмотреть сообщение
put
this
ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX, "Rules","1.Cheating and hacking - Permban\n2.Write on the forum if you want help!\nhttp://freeroam-samp.ucoz.com/forum\n3.Race on LS only\n4.Respect The Administrators and the moderators!\n5.Report asap if you see glitch/bug/cheaters/hackers!","Agree","Deny");
to onplayerconnect
Quote:
Originally Posted by jonnyboy
Посмотреть сообщение
ok, i give it a try
it didn't work! (compile works fine but In-Game don't work)
Reply
#9

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" dialog");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"rules","This is where you veiw the player rules\n1. cheating and hacking - permban\n2.Write on the forum if you want help ( URL )\n3.Race on LS only\n4.Respect The Administrators and the moderators!\n5.Report asap if you see glitch/bug/cheaters/hackers!\n","Agree","Deny");
        return 1;
        }
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
       if(response)
        {
          SendClientMessage(playerid,0x008000FF, "Enjoy your stay!");
        }
        else
        {
          SendClientMessage(playerid, 0xFF0000FF, "You don't want to follow the rules! Goodbye");
          Kick(playerid);
        }
        return 1;
      }
}
Reply
#10

3 new errors
Код:
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(23) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(38) : warning 217: loose indentation
C:\Documents and Settings\Old Smurf\My Documents\Hдmtade filer\gta\freeroam\filterscripts\dialog.pwn(40) : warning 209: function "OnDialogResponse" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)