Dialog help!!!!!! - 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: Dialog help!!!!!! (
/showthread.php?tid=598622)
Dialog help!!!!!! -
ManIsHere - 15.01.2016
Hi all i am New in Server making and i try to make Dialog in CMD /stats.
but i am facing 1 error which i cant solve. Anyone of you can help me?
Quote:
C:\Users\Admin\Desktop\Unknown\Unknown\gamemodes\U nknown.pwn(20771) : error 017: undefined symbol "cmdtext"
C:\Users\Admin\Desktop\Unknown\Unknown\gamemodes\U nknown.pwn(20773) : warning 202: number of arguments does not match definition
C:\Users\Admin\Desktop\Unknown\Unknown\gamemodes\U nknown.pwn(20773) : warning 202: number of arguments does not match definition
C:\Users\Admin\Desktop\Unknown\Unknown\gamemodes\U nknown.pwn(20773) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
|
And here is my Command /stats
Quote:
CMD : stats(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!strcmp(cmdtext,"/drinks", true))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST,"Ok");
}
ShowStatsSmall(playerid, playerid);
return 1;
}
|
Re: Dialog help!!!!!! -
-CaRRoT - 15.01.2016
Код:
if(!strcmp(cmdtext,"/drinks", true))
Not sure why did you add that line over there, makes no sense at all. Just remove it.
Plus you need to use the correct format for ShowPlayerDialog.
Код:
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
Re: Dialog help!!!!!! -
GTLS - 15.01.2016
your American Roleplay Script already has ShowStatsSmall system so editing in /stats cmd, it wont work.edit ShowStatsSmall to edit what you want to.also remove that cmdtext line from this CMD..
now for Dilouge, use format to format all lines of stats and use
PHP код:
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MESSAGE, YOUR FORMATED STRING, BUTTON 1, BUTTON 2);
that cmdtext error came because A:RP is already using zcmd.so zcmd formats
not
PHP код:
if(!string(cmdtext, "/YOURCOMMAND") == 0)
anymore..!!
Re: Dialog help!!!!!! -
ManIsHere - 15.01.2016
Thanks GTLS and CaRRot Rep++ to both of you
Re: Dialog help!!!!!! -
GTLS - 15.01.2016
its ok, we are always here to help.