Error on dialog?
#1

Error:
Код:
}E:\New folder\gamemodes\roleplay.pwn(95754) : error 030: compound statement not closed at the end of file (started at line 95735)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Error in line:
Код:
 if (PlayerInfo[playerid][pAdmin] >= 1)
my code:
Код:
CMD:arules(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 1)
	{
             I WONT SHOW THE LINES.
	ShowPlayerDialog(playerid, 19100,DIALOG_STYLE_MSGBOX, "Administrator Rules", arule, "Thank You", "");
	return 1;
}
And how can i change the length of my pm? I changed string but still same.
my code:
Код:
CMD:pm(playerid, params[])
{
    new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "us", id, str2))
    {
        SendClientMessage(playerid, 0xFF0000FF, "Tip: /pm <id> <message>");
        return 1;
    }
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
    if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
    else
	{
        GetPlayerName(playerid, Name1, sizeof(Name1));
        GetPlayerName(id, Name2, sizeof(Name2));
        format(str, sizeof(str), "{FFCC00}((PM To %s(ID %d): %s))", Name2, id, str2);
        SendClientMessage(playerid, 0xFF0000FF, str);
        format(str, sizeof(str), "{FFCC00}((PM From %s(ID %d): %s))", Name1, playerid, str2);
        SendClientMessage(id, 0xFF0000FF, str);
    }
    return 1;
}
Reply
#2

pawn Код:
CMD:arules(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
             I WONT SHOW THE LINES.
    ShowPlayerDialog(playerid, 19100,DIALOG_STYLE_MSGBOX, "Administrator Rules", arule, "Thank You", "");
}
    return 1;
}
try this + u can't lengthen ur PM command, one client msg's maximum length is 128
Reply
#3

But the length is too small. if i type: /pm 0 hey dude. how are you my buddy?

It only shows: Hey dude. How are you other "my buddy" does not show. for an example.
Reply
#4

change this
pawn Код:
if(sscanf(params, "us", id, str2))
to

pawn Код:
if(sscanf(params, "us[128]", id, str2))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)