if (strcmp("/help",cmdtext,true,10) == 0)
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_MSGBOX,"Welcome To BattleField IV","Objectives:\n PAK: You need to kill your enemy (USA) and place a C4 near Control Center in your enemy base\n USA: You need to kill your enemy (PAK) and place C4 near AirForces\nCommands:\n /kill - To kill yourself\n /ct - To change your class\n /login - To login to your account\n /stats [id] - see others stats. you can see your stats too by using only /stats without id\n /admins - To see online admins\n /vip - To see online Vips\n /report - To report player to online admins\n /changepass [new password] - To change your password","Ok","");
return 1;
}else return SendClientMessage(playerid, COLOR_RED,"[ERROR] You entered wrong command, Type /help");
C:\Users\toshiba\Desktop\C&R\gamemodes\gamemode.pwn(267) : error 075: input line too long (after substitutions) C:\Users\toshiba\Desktop\C&R\gamemodes\gamemode.pwn(268) : error 037: invalid string (possibly non-terminated string) C:\Users\toshiba\Desktop\C&R\gamemodes\gamemode.pwn(268) : error 029: invalid expression, assumed zero C:\Users\toshiba\Desktop\C&R\gamemodes\gamemode.pwn(268) : error 017: undefined symbol "n" C:\Users\toshiba\Desktop\C&R\gamemodes\gamemode.pwn(268) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
if (strcmp("/help",cmdtext,true,10) == 0)
What is the error?
And, pawn Код:
|
if(!strcmp("/help",cmdtext,true))
or
if(!strcmp("/help",cmdtext))
I also use strcat to attach two strings but i got something better and way more easy which is "\" symbol. Whenever you want to part one string into a new line like a function just use this symbol in the end and start writing the next part of the string in the next line and close the quotes so that it will be a proper string. |
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_MSGBOX,"Welcome To BattleField IV","Objectives:\n PAK: You need to kill your enemy (USA) and place a C4 near Control Center in your enemy base\n USA: You need to kill your enemy (PAK) and place C4 near AirForces\nCommands:\n /kill - To kill yourself\n /ct - To change your class\n /login - To login to your account\n /stats [id] - see others stats. you can see your stats too by using only /stats without id\n /admins - To see online admins\n /vip - To see online Vips\n /report - To report player to online admins\n /changepass [new password] - To change your password","Ok","");
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_MSGBOX,"Welcome To BattleField IV","Objectives:\n PAK: You need to kill your enemy (USA) and place a C4 near Control Center in your enemy base\n \
USA: You need to kill your enemy (PAK) and place C4 near AirForces\nCommands:\n /kill - To kill yourself\n /ct - To change your class\n /login - To login to your account\n \
/stats [id] - see others stats. you can see your stats too by using only /stats without id\n /admins - To see online admins\n /vip - To see online Vips\n /report - To report player to online admins\n \
/changepass [new password] - To change your password","Ok","");