-Identifier-
#1

My final error on my /interior command is this identifier, here is the code/error/line
Код:
C:\Users\Ryan\Desktop\Ryan's Server\gamemodes\VGRP.pwn(54877) : error 001: expected token: ";", but found "-identifier-"
Код:
        ShowPlayerDialog(playerid,4,4,string,"BUTTON1","BUTTON2");
Reply
#2

Show me the whole command or script piece please.
Reply
#3

Код:
CMD:interiors(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        new string[50];
        format(string,sizeof(string),"Your interior is %d.",GetPlayerInterior(playerid))
        ShowPlayerDialog(playerid,4,4,string,"BUTTON1","BUTTON2");
    }
    else { SendClientMessage(playerid,COLOR_GRAD1,"No authorization."); }
}
Reply
#4

You forget ; in 54876. line.

pawn Код:
format(string,sizeof(string),"Your interior is %d.",GetPlayerInterior(playerid));
Reply
#5

Try this

Код:
CMD:interiors(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        new string[50];
        format(string, sizeof(string),"Your interior is %d.",GetPlayerInterior(playerid));
        ShowPlayerDialog(playerid, 4, 4, string,"BUTTON1","BUTTON2");
    }
    else { SendClientMessage(playerid,COLOR_GRAD1,"No authorization."); }
}
Also what are the 4, 4, what do they mean?
Reply
#6

Quote:
Originally Posted by Duck4coder
Посмотреть сообщение
Try this

Код:
CMD:interiors(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        new string[50];
        format(string, sizeof(string),"Your interior is %d.",GetPlayerInterior(playerid));
        ShowPlayerDialog(playerid, 4, 4, string,"BUTTON1","BUTTON2");
    }
    else { SendClientMessage(playerid,COLOR_GRAD1,"No authorization."); }
}
Also what are the 4, 4, what do they mean?
Doesnt matter about the 4, 4 things but there isnt a dialog ID with the value of 4, it goes from 0 to 3, look at Dialog Styles
Reply
#7

Shouldnt it be
pawn Код:
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_MSGBOX, "Title", string, "BUTTON1", "BUTTON2")
?

you have:
ShowPlayerDialog(playerid, dialogid, style, info[], button1[], button2[]);

it should be:
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
Reply
#8

Quote:
Originally Posted by TheFlyer
Посмотреть сообщение
Shouldnt it be
pawn Код:
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_MSGBOX, "Title", string, "BUTTON1", "BUTTON2")
?

you have:
ShowPlayerDialog(playerid, dialogid, style, info[], button1[], button2[]);

it should be:
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
That is correct, I am assuming that the 4 after playerid, has already been defined as a dialog id with
#define DIALOG_INTERIORS 4 or something like that
But I belive that "String" is already the name of the MSGBOX so you wouldn't need the "Title" as string takes it's place
apart from that, yes you're correct
Reply
#9

Do what Duck said.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)