DIALOG_STYLE_MSGBOX 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_STYLE_MSGBOX Help (
/showthread.php?tid=325603)
DIALOG_STYLE_MSGBOX Help -
stormchaser206 - 13.03.2012
Also, I use LuxAdmin.
Heres my code:
pawn Код:
dcmd_viphelp(playerid)
{
if(IsPlayerVipType(playerid,2))
{
ShowPlayerDialog(playerid,DIALOG_VIPHELP,DIALOG_STYLE_MSGBOX,"VIP Help (/viphelp)","VIP Level 1 Commands: /viphelp = Show this Dialog \n/vipkill = A /kill that you don't lose any money for using.\n/vweaps1 = Level 1 VIP Weapons \n VIP Level 2 Commands:\n/repairme = Repair Your Car \n/flipme = Flip Your Car + Repair It \n/vweaps2 = Get Level 2 VIP Weapons\nVIP LEVEL 3 COMMAND\n/restoreme = Restores: Your Health, Armour, and Vehicle Health.[WARNING: You will be jailed, warned, or VIP level set to 2 if you abuse.] \n/vweaps3 = Gives you Level 3 VIP Weapons. \n/vweapsmix = Gives you a mix of Different VIP Weapons.","Ok","Click Me");
SendClientMessage(playerid, COLOR_RED, "You Just typed /viphelp. This gives you a list of vip commands.");
}
else SendClientMessage(playerid, COLOR_RED, "ERROR: You do not have enough rights to execute this command.");
return 1;
}
It has to many error messages in the compiler, and i am trying to do that. Do I have to add something on OnDialogResponse? Please help.
COMPILER:
Код:
C:\Users\Keegan\Desktop\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Desktop\pawno\include\dutils.inc(140) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Desktop\pawno\include\dutils.inc(180) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Desktop\pawno\include\dutils.inc(275) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Desktop\pawno\include\dutils.inc(332) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Desktop\pawno\include\dini.inc(239) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Downloads\WorldWar.pwn(62) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(543) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(544) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(545) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(553) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Downloads\WorldWar.pwn(565) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Downloads\WorldWar.pwn(586) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Keegan\Downloads\WorldWar.pwn(591) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(591) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(621) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(621) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(622) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(622) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(623) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(623) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(624) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(624) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(626) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(626) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(630) : warning 225: unreachable code
C:\Users\Keegan\Downloads\WorldWar.pwn(640) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(640) : warning 202: number of arguments does not match definition
C:\Users\Keegan\Downloads\WorldWar.pwn(702) : error 075: input line too long (after substitutions)
C:\Users\Keegan\Downloads\WorldWar.pwn(703) : error 037: invalid string (possibly non-terminated string)
C:\Users\Keegan\Downloads\WorldWar.pwn(703) : error 017: undefined symbol "VIP"
C:\Users\Keegan\Downloads\WorldWar.pwn(703) : error 017: undefined symbol "Level"
C:\Users\Keegan\Downloads\WorldWar.pwn(703) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
Re: DIALOG_STYLE_MSGBOX Help -
coole210 - 14.03.2012
pawn Код:
dcmd_viphelp(playerid,params[])
{
#pragma unused params
if(IsPlayerVipType(playerid,2))
{
ShowPlayerDialog(playerid,DIALOG_VIPHELP,DIALOG_STYLE_MSGBOX,"VIP Help (/viphelp)","VIP Level 1 Commands: /viphelp = Show this Dialog \n/vipkill = A /kill that you don't lose any money for using.\n/vweaps1 = Level 1 VIP Weapons \n VIP Level 2 Commands:\n/repairme = Repair Your Car \n/flipme = Flip Your Car + Repair It \n/vweaps2 = Get Level 2 VIP Weapons\nVIP LEVEL 3 COMMAND\n/restoreme = Restores: Your Health, Armour, and Vehicle Health.[WARNING: You will be jailed, warned, or VIP level set to 2 if you abuse.] \n/vweaps3 = Gives you Level 3 VIP Weapons. \n/vweapsmix = Gives you a mix of Different VIP Weapons.","Ok","Click Me");
SendClientMessage(playerid, COLOR_RED, "You Just typed /viphelp. This gives you a list of vip commands.");
}
else return SendClientMessage(playerid, COLOR_RED, "ERROR: You do not have enough rights to execute this command.");
}
Re: DIALOG_STYLE_MSGBOX Help -
stormchaser206 - 14.03.2012
That still didnt work
Re: DIALOG_STYLE_MSGBOX Help -
SimonItaly - 14.03.2012
Код:
error 075: input line too long (after substitutions)
You have to create an huge string (your's more then 530 I see), then insert parts of the string with strcat.
pawn Код:
new string[600];
strcat(string, "VIP Level 1 Commands: [...]");
strcat(...);
ShowPlayerDialog(playerid,DIALOG_VIPHELP,DIALOG_STYLE_MSGBOX,"VIP Help (/viphelp)",string,"OK","Click me");
That's the only way, I think.