very lil question
#1

Код:
OnPlayerCommandText(blablabla)
{
blablalalblal
return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Commands :", "Account : /register , /login , /changepass , /getid , /resetstats.\nPlayer : /stats , /givecash , /kill , /me , /pm , /changeclass , /shop.\nOther :\n/ahelp ==> Admin Commands\n/vhelp ==> V.I.P Help\n/rules ==> Rules.\n#[Text] ==> Admin Chat.\n*[Text] ==> Team Chat.\n/objective ==> Objective.\n/admins ==> Admins Online.\n/report [id] [reason] .\n/animlist ==> Animations List.\n/wthelp ==> Walkie Talkie Help.", "Ok", "Cancel");
return SendClientMessage(playerid, COLOR_WHITE, "Command Doesn't Exist , This Is The List Of All Commands");
}
Код:
warning 225: unreachable code
can anyone help?
________
LovelyWendie
Reply
#2

you are returning, which means no code after that is excecuted, and you have code below (essentially you have code that is NEVER ran (except with goto's))

change it to
pawn Код:
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Commands :", "Account : /register , /login , /changepass , /getid , /resetstats.\nPlayer : /stats , /givecash , /kill , /me , /pm , /changeclass , /shop.\nOther :\n/ahelp ==> Admin Commands\n/vhelp ==> V.I.P Help\n/rules ==> Rules.\n#[Text] ==> Admin Chat.\n*[Text] ==> Team Chat.\n/objective ==> Objective.\n/admins ==> Admins Online.\n/report [id] [reason] .\n/animlist ==> Animations List.\n/wthelp ==> Walkie Talkie Help.", "Ok", "Cancel");
SendClientMessage(playerid, COLOR_WHITE, "Command Doesn't Exist , This Is The List Of All Commands");
return 1;
Reply
#3

that return 1; will show : Server : Unknown Command , and i dont want that i want it to show the dialog and the message
________
Gnosticism Dicussion
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)