PM dialog (OnPlayerClicked...)
#1

Error output
Код:
C:\Program Files\SAMP\gamemodes\erp.pwn(340) : error 017: undefined symbol "clickedplayer"
C:\Program Files\SAMP\gamemodes\erp.pwn(362) : error 017: undefined symbol "ClickedPlayerID"
C:\Program Files\SAMP\gamemodes\erp.pwn(362) : warning 215: expression has no effect
C:\Program Files\SAMP\gamemodes\erp.pwn(362) : error 001: expected token: ";", but found "]"
C:\Program Files\SAMP\gamemodes\erp.pwn(362) : error 029: invalid expression, assumed zero
C:\Program Files\SAMP\gamemodes\erp.pwn(362) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
OnPlayerClickPlayer
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
  new clickedplayer[MAX_PLAYER_NAME];
	ClickedPlayerID[playerid] = clickedplayer;
  ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Erasхnum","Kirjuta siia, mida sa soovid saata mдngijale kirja:\n","Saada!","Loobu");
	return 1;
}
OnDialogResponse
Код:
if(dialogid == 1) // Erasхnumi sьsteem
	{
	  SendClientMessage(clickedplayer, VARV_VALGE, "[ES][ID:%d] :: %s", playerid, inputtext);
	  return 1;
	}
340
Код:
SendClientMessage(clickedplayer, VARV_VALGE, "[ES][ID:%d] :: %s", playerid, inputtext);
362
Код:
ClickedPlayerID[playerid] = clickedplayer;
Reply
#2

Help?
Reply
#3

Try this (Not Tested):

In Top
pawn Код:
new ClickedPlayerID[MAX_PLAYERS];
And change "OnPlayerClickPlayer" to:

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
ClickedPlayerID[playerid] = clickedplayerid;
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Erasхnum","Kirjuta siia, mida sa soovid saata mдngijale kirja:\n","Saada!","Loobu");
return 1;
}

Reply
#4

Check my clickpm's first version.

SINGATURE :P
Reply
#5

Код:
C:\Program Files\SAMP\gamemodes\erp.pwn(356) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
SendClientMessage(ClickedPlayerID, VARV_VALGE, "[ES][ID:%d] :: %s", playerid, inputtext);
Reply
#6

You need to format the message before you send it.
Reply
#7

Try:
pawn Код:
new str[128];
format(str,sizeof(str),"[ES][ID:%d] :: %s", playerid, inputtext);
SendClientMessage(ClickedPlayerID[playerid],VARV_VALGE,str);
Reply
#8

Is ok?
Код:
new EraS6num[256];
	  format(EraS6num,256,"[ES][ID:%d] :: %s", playerid, inputtext);
	  SendClientMessage(ClickedPlayerID, VARV_VALGE, EraS6num);
// Nvm, thanks for who helped.
Reply
#9

Erm, no. Don't use 256 cells because MAX IO in sa:mp chat-box is 128 and not 256.
Reply
#10

Are you crazy? 256 cells? Not is necessary! Use 128!

pawn Код:
new EraS6num[128];
format(EraS6num,256,"[ES][ID:%d] :: %s", playerid, inputtext);
SendClientMessage(ClickedPlayerID[playerid], VARV_VALGE, EraS6num);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)