Maybe you can help out...
#1

pawn Код:
(Line 70): public OnPlayerConnect(playerid)
{
    new pname[MAX_PLAYER_NAME], string[63 + MAX_PLAYER_NAME];
    SendClientMessage(playerid,COLOR_GREEN,"Welcome to San Andreas *****");
    SendClientMessage(playerid,COLOR_GREEN,"Make sure you read and Abide by our /rules, and obey our admins.");
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{F81414}San Andreas City Cops and Robbers","{FFFFFF}Welcome, Type your password below to login.\nIf it's not you, relog with a different username","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{F81414}San Andreas City Cops and Robbers ","{FFFFFF}Welcome, Type your password below to register a new account.","Register","Quit");
    }
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s has Joined the server.", pname);
    SendClientMessageToAll(COLOR_CYAN, string);
    {
    new C_Rules
    BigString[1900];
    strcat(BigString, "\n", 1900);
    strcat(BigString, "\n", 1900);
    strcat(BigString, "\n", 1900);
    strcat(BigString, "\n", 1900);
    strcat(BigString, "\n", 1900);
    strcat(BigString, "\n", 1900);
    strcat(BigString, "\n", 1900);
    strcat(BigString, "\n", 1900);
    strcat(BigString, "\n", 1900);
    ShowPlayerDialog(playerid,C_Rules, DIALOG_STYLE_MSGBOX, "{ff0000}Rules", BigString, "Accept","Don't Accept";
    return 1;
    }
}             (<<<<Line 102)
Код:
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(99) : error 029: invalid expression, assumed zero
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(99) : warning 215: expression has no effect
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(99) : warning 215: expression has no effect
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(99) : warning 215: expression has no effect
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(99) : warning 215: expression has no effect
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(99) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

A. You've double return 1;
-------------------------

Common Mistake :

Код:
ShowPlayerDialog(playerid,C_Rules, DIALOG_STYLE_MSGBOX, "{ff0000}Rules", BigString, "Accept","Don't Accept");
You forgot the ")"
Reply
#3

Check out here:


pawn Код:
ShowPlayerDialog(playerid, 32767, DIALOG_STYLE_MSGBOX, "MyDialog", "Rules", "Accept", "Don't accept");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 32767){
        if(response){
            //The player has pressed "Accept".
        }
        else{
            //The player has pressed "Don't accept".
        }
    }
    return 0;
}
Reply
#4

pawn Код:
public OnPlayerConnect(playerid,dialogid)
{
    {
       new pname[MAX_PLAYER_NAME], string[63 + MAX_PLAYER_NAME];
       SendClientMessage(playerid,COLOR_GREEN,"Welcome to San Andreas *****");
       SendClientMessage(playerid,COLOR_GREEN,"Make sure you read and Abide by our /rules, and obey our admins.");
       if(dialogid == 5)
       {
        new C_Rules;
        new BigString[1900];
        strcat(BigString, "\1.", 1900 );
        strcat(BigString, "\n", 1900 );
        strcat(BigString, "\n", 1900 );
        strcat(BigString, "\n", 1900 );
        strcat(BigString, "\n", 1900 );
        strcat(BigString, "\n", 1900 );
        strcat(BigString, "\n", 1900 );
        strcat(BigString, "\n", 1900 );
        strcat(BigString, "\n", 1900 );
        ShowPlayerDialog(playerid,C_Rules, DIALOG_STYLE_MSGBOX, "{ff0000}Rules", BigString, "Accept","Don't Accept");
        }
        if(fexist(UserPath(playerid)))
        {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{F81414}San Andreas &&&&","{FFFFFF}Welcome, Type your password below to login.\nIf it's not you, relog with a different username","Login","Quit");
        }
        else
        {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{F81414}San Andreas *** ","{FFFFFF}Welcome, Type your password below to register a new account.","Register","Quit");
        }
        GetPlayerName(playerid, pname, sizeof(pname));
        format(string, sizeof(string), "%s has Joined the server.", pname);
        SendClientMessageToAll(COLOR_CYAN, string);
        return 1;
     }
}
Error:
Код:
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(70) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Line 70 is public.......
Reply
#5

<Internet Lagged>>

Sorry for the double post
Reply
#6

public OnPlayerConnect(playerid) , Set it as this
Reply
#7

It won't define dialogid.

Код:
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(76) : error 017: undefined symbol "dialogid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#8

public OnPlayerConnect(playerid,dialogid) <--- its case sensitive so re-check your code.
Reply
#9

That's how it is, just like you did it
pawn Код:
public OnPlayerConnect(playerid,dialogid)
Still that error
Код:
D:\SAMP\Server\SARP\gamemodes\SACCNR.pwn(70) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#10

Show me your Forward Coding.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)