Dialog help [Fast Plz]
#1

You must read the info below:

I tried to make something like when my mission will be completed ill get a dialog. That from where and to where i finished my mission and how much i get.

My codes:
Код:
#define TXT_PlayerCompletedPilotJob "{FFFFFF}Pilot {FF00FF}%s{FFFFFF} succesfully transported {0000FF}%s{FFFFFF}"
#define TXT_PlayerCompletedPilotJobInfo "ShowPlayerDialog(playerid,2222,DIALOG_STYLE_MSGBOX,"Mission Completed","Your mission has been completed from %s to %s","ok","");
Код:
	// Construct the message sent to all players that this player completed a pilot mission
			format(Msg1, 128, TXT_PlayerCompletedPilotJob, Name, Load);
			format(Msg2, 128, TXT_PlayerCompletedPilotJobInfo, StartLoc, EndLoc);
			SendClientMessageToAll(0xFFFFFFFF, Msg1);
			SendClientMessageToAll(0xFFFFFFFF, Msg2);
errors:
Код:
E:\WOT\gamemodes\555.pwn(7067) : error 001: expected token: "-string end-", but found "-identifier-"
E:\WOT\gamemodes\555.pwn(7067) : error 017: undefined symbol "Mission"
E:\WOT\gamemodes\555.pwn(7067) : error 017: undefined symbol "Completed"
E:\WOT\gamemodes\555.pwn(7067) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#2

you didnt defined " Mission" and " Completed" symbol !
define them
show line 7067
Reply
#3

pawn Код:
#define TXT_PlayerCompletedPilotJobInfo "ShowPlayerDialog(playerid,2222,DIALOG_STYLE_MSGBOX,"Mission Completed","Your mission has been completed from %s to %s","ok","");
Don't use the quote and neither the ShowPlayerDialog in there. Do it like the first one - only a message and format it. Then send it as a client message or in dialog.
Reply
#4

Or, the letters has increased the total limit. Try taking out useless stuff and compile.
Reply
#5

Line:
format(Msg2, 128, TXT_PlayerCompletedPilotJobInfo, StartLoc, EndLoc);

and @Konstantinos it should work... in my way
Reply
#6

No, it shouldn't. Replace the definition with what you have and you'll understand. What you do is:
pawn Код:
format(Msg2, 128, "ShowPlayerDialog(playerid,2222,DIALOG_STYLE_MSGBOX,"Mission Completed","Your mission has been completed from %s to %s","ok","");, StartLoc, EndLoc);
which is totally incorrect. It should be as the first one, a message that you need to format and then send the formatted message as "info" parameter of the dialog.
Reply
#7

Lol... see? same error:
Код:
E:\WOT\gamemodes\555.pwn(7066) : error 001: expected token: "-string end-", but found "-identifier-"
E:\WOT\gamemodes\555.pwn(7066) : error 017: undefined symbol "Mission"
E:\WOT\gamemodes\555.pwn(7066) : error 017: undefined symbol "Completed"
E:\WOT\gamemodes\555.pwn(7066) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#8

You're still missing my point. The code I posted above is not for use. It's what you've done which does NOT work and it shouldn't as you thought.
Reply
#9

it should be
pawn Код:
#define TXT_PlayerCompletedPilotJobInfo "ShowPlayerDialog(playerid,2222,DIALOG_STYLE_MSGBOX,"Mission Completed","Your mission has been completed from %s to %s","ok","");"
u missed a " at last of this line
Reply
#10

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
it should be
pawn Код:
#define TXT_PlayerCompletedPilotJobInfo "ShowPlayerDialog(playerid,2222,DIALOG_STYLE_MSGBOX,"Mission Completed","Your mission has been completed from %s to %s","ok","");"
u missed a " at last of this line
The ShowPlayerDialog function will never be executed because it's just a text. And if you try to send that as a client message, the placeholder "%s" will eventually crash the server. That's why I said it should be as the first one, only a text that must be formatted first and then being sent as a client message, dialog or whatever he wants.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)