SA-MP Forums Archive
-Identifier- - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: -Identifier- (/showthread.php?tid=491953)



-Identifier- - Ryan McDuff - 01.02.2014

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");



Re: -Identifier- - Duck4coder - 01.02.2014

Show me the whole command or script piece please.


Re: -Identifier- - Ryan McDuff - 01.02.2014

Код:
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."); }
}



Re: -Identifier- - blackeagle1122 - 01.02.2014

You forget ; in 54876. line.

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



Re: -Identifier- - Duck4coder - 01.02.2014

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?


Re: -Identifier- - Duck4coder - 01.02.2014

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


Re: -Identifier- - TheFlyer - 01.02.2014

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[]);


Re: -Identifier- - Duck4coder - 01.02.2014

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


Re: -Identifier- - Rory - 01.02.2014

Do what Duck said.