SA-MP Forums Archive
Help Dialog Error - 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: Help Dialog Error (/showthread.php?tid=472384)



Help Dialog Error - proSeryoga - 28.10.2013

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




Re: Help Dialog Error - Konstantinos - 28.10.2013

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

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


Re: Help Dialog Error - -=Dar[K]Lord=- - 28.10.2013

theres something missing there might be some function ....


Re: Help Dialog Error - TomatoRage - 28.10.2013

-deleted


Re: Help Dialog Error - TomRedlake - 28.10.2013

Maybe you didnt define something..


Re: Help Dialog Error - proSeryoga - 28.10.2013

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


Re: Help Dialog Error - Konstantinos - 28.10.2013

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.


Re: Help Dialog Error - proSeryoga - 28.10.2013

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




Re: Help Dialog Error - Konstantinos - 28.10.2013

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.


Re: Help Dialog Error - proSeryoga - 28.10.2013

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