Dialog help!!!!!!
#1

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;
}
Reply
#2

Код:
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[])
Reply
#3

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(playeridDIALOGIDDIALOG_STYLE_MESSAGEYOUR FORMATED STRINGBUTTON 1BUTTON 2); 
that cmdtext error came because A:RP is already using zcmd.so zcmd formats
PHP код:
CMD:YOURCOMMAND 
not
PHP код:
if(!string(cmdtext"/YOURCOMMAND") == 0
anymore..!!
Reply
#4

Thanks GTLS and CaRRot Rep++ to both of you
Reply
#5

its ok, we are always here to help.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)