Help Dialog Error
#1

Quote:

if(dialogid == 036)
{
if(!response)
{
SendClientMessage(playerid,COLOR_RED,"canceled");
}
if(response)
{
if(IsNumeric(inputtext))
{
PlayerInfo[playerid][pAdmin](ChosenPlayer[playerid],strval(inputtext));
format(stri,128,"Admin: %s issued admin %d",pName,strval(inputtext));
SendClientMessage(ChosenPlayer[playerid],COLOR_RED,stri);
format(stri,128,"you have changed %s Admin level %d",ClickedPlayerName,strval(inputtext));
}
else
{
SendClientMessage(playerid,COLOR_RED,"Please enter the number of");
ShowPlayerDialog(playerid,admindialog,DIALOG_STYLE _INPUT,"Install the Admin level","Enter the number of levels","Enter","Close");
}
}
}

Error:
Quote:

\gamemodes\new.pwn(1185) : warning 215: expression has no effect
\gamemodes\new.pwn(1185) : error 001: expected token: ";", but found "("
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

Quote:

PlayerInfo[playerid][pAdmin](ChosenPlayer[playerid],strval(inputtext));

Reply
#2

PlayerInfo[playerid][pAdmin]
ChosenPlayer[playerid]
strval(inputtext)

Those differ from each others. What do you want to do?
Reply
#3

theres something missing there might be some function ....
Reply
#4

-deleted
Reply
#5

Maybe you didnt define something..
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
PlayerInfo[playerid][pAdmin]
ChosenPlayer[playerid]
strval(inputtext)

Those differ from each others. What do you want to do?
admin lvl - go dialog
Reply
#7

I think I understood. You want to set that player's admin level to the value of inputtext, right?
pawn Код:
if(IsPlayerConnected(ChosenPlayer[playerid]) PlayerInfo[ChosenPlayer[playerid]][pAdmin] = strval(inputtext);
I check if the player is connected to prevent runtime errors.
Reply
#8

works
that's life
and I want the admin

Quote:

if(dialogid == 246)
{
if(!response)
{
SendClientMessage(playerid,COLOR_RED,"Close");
}
if(response)
{
if(IsNumeric(inputtext))
{
AC_BS_SetPlayerHealth(ChosenPlayer[playerid],strval(inputtext));
format(stri,128,"Admin: %s go Healt %d",pName,strval(inputtext));
SendClientMessage(ChosenPlayer[playerid],COLOR_RED,stri);
/*new string2[128];*/
format(stri,128,"Admin %s healt %d",ClickedPlayerName,strval(inputtext));
}
else
{
SendClientMessage(playerid,COLOR_RED,"number");
ShowPlayerDialog(playerid,healthdialog,DIALOG_STYL E_INPUT,"Healt","number:","enter","Close");
}
}
}

Reply
#9

I don't understand what you want to do. Would you mind to explain it again (a bit better)?

By the way, are you sure ClickedPlayerName stores the player's name? I think not.
Reply
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I think I understood. You want to set that player's admin level to the value of inputtext, right?
pawn Код:
if(IsPlayerConnected(ChosenPlayer[playerid]) PlayerInfo[ChosenPlayer[playerid]][pAdmin] = strval(inputtext);
I check if the player is connected to prevent runtime errors.
thank you
works

Quote:

if(IsPlayerConnected(ChosenPlayer[playerid])) PlayerInfo[ChosenPlayer[playerid]][pAdmin] = strval(inputtext);





Admin lvl enter
Player Nick click TAB
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)