ONPlayerConnect
#1

Код:
C:\Users\Medo\Desktop\New\gamemodes\new.pwn(145) : error 010: invalid function or declaration
C:\Users\Medo\Desktop\New\gamemodes\new.pwn(147) : error 021: symbol already defined: "INI_ParseFile"
C:\Users\Medo\Desktop\New\gamemodes\new.pwn(147) : error 017: undefined symbol "playerid"
C:\Users\Medo\Desktop\NEW\gamemodes\new.pwn(147) : error 010: invalid function or declaration
C:\Users\Medo\Desktop\New\gamemodes\new.pwn(147 -- 150) : fatal error 107: too many error messages on one line
pawn Код:
public OnPlayerConnect(playerid)
{
    Password[playerid] = CreatePlayerTextDraw(playerid, 301.311187, 181.416687, "Enter Password...");
    PlayerTextDrawLetterSize(playerid, Password[playerid], 0.274000, 1.092499);
    PlayerTextDrawAlignment(playerid, Password[playerid], 1);
    PlayerTextDrawColor(playerid, Password[playerid], -1);
    PlayerTextDrawSetShadow(playerid, Password[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Password[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, Password[playerid], 51);
    PlayerTextDrawFont(playerid, Password[playerid], 2);
    PlayerTextDrawSetProportional(playerid, Password[playerid], 1);
    PlayerTextDrawSetSelectable(playerid, Password[playerid], true);
    }
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
    PlayerTextDrawShow(playerid, Password[playerid]);
    TextDrawShowForPlayer(playerid, RegisterBox);
    TextDrawShowForPlayer(playerid, PasswordBox);
    TextDrawShowForPlayer(playerid, RegisterWelcome);
    TextDrawShowForPlayer(playerid, RegisterNext);
    TextDrawShowForPlayer(playerid, RegisterUnderline);
    TogglePlayerSpectating(playerid, 1);
    SelectTextDraw(playerid, 0xFF000088);
    return 1;
}
Im not able to put the textdraw definer ontop of the fexist Y_ini systems, but i have to keep the textdraw definer ontop of it so it can appear, because on the next line in the script it will be used so it needs to be defined before the fexit part, but it keeps giving me errors
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
    Password[playerid] = CreatePlayerTextDraw(playerid, 301.311187, 181.416687, "Enter Password...");
    PlayerTextDrawLetterSize(playerid, Password[playerid], 0.274000, 1.092499);
    PlayerTextDrawAlignment(playerid, Password[playerid], 1);
    PlayerTextDrawColor(playerid, Password[playerid], -1);
    PlayerTextDrawSetShadow(playerid, Password[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Password[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, Password[playerid], 51);
    PlayerTextDrawFont(playerid, Password[playerid], 2);
    PlayerTextDrawSetProportional(playerid, Password[playerid], 1);
    PlayerTextDrawSetSelectable(playerid, Password[playerid], true);
   
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        PlayerTextDrawShow(playerid, Password[playerid]);
        TextDrawShowForPlayer(playerid, RegisterBox);
        TextDrawShowForPlayer(playerid, PasswordBox);
        TextDrawShowForPlayer(playerid, RegisterWelcome);
        TextDrawShowForPlayer(playerid, RegisterNext);
        TextDrawShowForPlayer(playerid, RegisterUnderline);
        TogglePlayerSpectating(playerid, 1);
        SelectTextDraw(playerid, 0xFF000088);
    }
    return 1;
}
Here, this should work.

Try to indent your code to understand it better even yourself. You would've got the problem if your code was neatly indented.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)