Incerc sa adaug o comanda unde trebuie sa utilizez urmatorul dialog:
if(dialogid == 6666)
{
if (!response)
return 1;
if (sscanf( inputtext, "h", inputtext[0]))
return ShowPlayerDialog( playerid, DIALOG_WRITE_HEX, DIALOG_STYLE_INPUT, "Type a HEX Code", "{FF0000}Invalid HEX code ! Type it like: 'FFFF00'", "Set", "Cancel");
if (strlen( inputtext[0])!=6)
return ShowPlayerDialog( playerid, DIALOG_WRITE_HEX, DIALOG_STYLE_INPUT, "Type a HEX Code", "{FF0000}Invalid HEX code ! Type it like: 'FFFF00'", "Set", "Cancel");
PlayerInfo[playerid][p_TextColor]=inputtext[0];
FormatMSG(playerid, ~1, "You set your chat color to {%06x}this", PlayerInfo[playerid][p_TextColor]);
return 1;
}
Iar cand dau compile primesc urmatorile erori/warninguri:
C:\Users\Y\Desktop\X\filterscripts\LuxAdmin.pwn(10813) : error 017: undefined symbol "PlayerInfo"
C:\Users\Y\Desktop\X\filterscripts\LuxAdmin.pwn(10813) : warning 215: expression has no effect
C:\Users\Y\Desktop\X\filterscripts\LuxAdmin.pwn(10813) : error 001: expected token: ";", but found "]"
C:\Users\Y\Desktop\X\filterscripts\LuxAdmin.pwn(10813) : error 029: invalid expression, assumed zero
C:\Users\Y\Desktop\X\filterscripts\LuxAdmin.pwn(10813) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Astea fiind liniile 10812, 10813, 10814:
return ShowPlayerDialog( playerid, DIALOG_WRITE_HEX, DIALOG_STYLE_INPUT, "Type a HEX Code", "{FF0000}Invalid HEX code ! Type it like: 'FFFF00'", "Set", "Cancel");
PlayerInfo[playerid][p_TextColor]=inputtext[0];
FormatMSG(playerid, ~1, "You set your chat color to {%06x}this", PlayerInfo[playerid][p_TextColor]);
Question
infinity1
Incerc sa adaug o comanda unde trebuie sa utilizez urmatorul dialog:
if(dialogid == 6666) { if (!response) return 1; if (sscanf( inputtext, "h", inputtext[0])) return ShowPlayerDialog( playerid, DIALOG_WRITE_HEX, DIALOG_STYLE_INPUT, "Type a HEX Code", "{FF0000}Invalid HEX code ! Type it like: 'FFFF00'", "Set", "Cancel"); if (strlen( inputtext[0])!=6) return ShowPlayerDialog( playerid, DIALOG_WRITE_HEX, DIALOG_STYLE_INPUT, "Type a HEX Code", "{FF0000}Invalid HEX code ! Type it like: 'FFFF00'", "Set", "Cancel"); PlayerInfo[playerid][p_TextColor]=inputtext[0]; FormatMSG(playerid, ~1, "You set your chat color to {%06x}this", PlayerInfo[playerid][p_TextColor]); return 1; }Iar cand dau compile primesc urmatorile erori/warninguri: Astea fiind liniile 10812, 10813, 10814:return ShowPlayerDialog( playerid, DIALOG_WRITE_HEX, DIALOG_STYLE_INPUT, "Type a HEX Code", "{FF0000}Invalid HEX code ! Type it like: 'FFFF00'", "Set", "Cancel"); PlayerInfo[playerid][p_TextColor]=inputtext[0]; FormatMSG(playerid, ~1, "You set your chat color to {%06x}this", PlayerInfo[playerid][p_TextColor]);Stie careva cum sa le rezolv ?
4 answers to this question
Recommended Posts