PDA

View Full Version : Why ?


Johnson_Brooks
16/05/2014, 06:34 PM
CMD:help(playerid,params[])
{
new str[5200];
strcat(str,"{EEEEEE}Civilian:\n{EEEEEE}Your job is to earn money , the good way , and the bad way\n");
strcat(str,"{00FF00}Good way:\n{EEEEEE}Earn money as a pilot , and be a normal citizen\n{FF0000}Bad way:{EEEEEE}Kill the cops, rob banks/stores/players and earn easy money\n");
strcat(str,"{0000FF}Cop/CIA:{EEEEEE}Your job is to give a ticket to criminals and if they dont pay it , to arrest them with any means possible\n");
strcat(str,"{FFA500}Army:Your job is to help the Goverment by flying military planes to secret locations and gait paid for it.\n");
strcat(str,"{FFA500}You can also make the cops life easier by helping them since you're more skilled and have advanced weaponry\n");
ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "Help" , str ,"OK, "");
return 1;
}
This is the code and the errors:

error 037: invalid string (possibly non-terminated string)
CnR.pwn(1294) : warning 215: expression has no effect
CnR.pwn(1294) : error 001: expected token: ";", but found ")"
CnR.pwn(1294) : error 029: invalid expression, assumed zero
CnR.pwn(1294) : fatal error 107: too many error messages on one line

Any idea why is this happening ?
The error codes are on ShowPlayerDialog...

BigBrainAFK
16/05/2014, 06:35 PM
ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "Help" , str ,"OK, "");


should be


ShowPlayerDialog(playerid,10, DIALOG_STYLE_MSGBOX, "Help" , str ,"OK", "");

ball
16/05/2014, 06:36 PM
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Help", str, "OK", "");