Please help (5 errors) [Giving reputation] -
GangsTa_ - 09.10.2011
I'm about to make a big text in a dialog (works with other scripts, but this gives me an error). When I compiled the code I got the following errors:
Код:
D:\PROG\gta_nst\sampsrv\SA-RPG\gamemodes\sarpg.pwn(11157) : error 029: invalid expression, assumed zero
D:\PROG\gta_nst\sampsrv\SA-RPG\gamemodes\sarpg.pwn(11163) : error 014: invalid statement; not in switch
D:\PROG\gta_nst\sampsrv\SA-RPG\gamemodes\sarpg.pwn(11163) : warning 215: expression has no effect
D:\PROG\gta_nst\sampsrv\SA-RPG\gamemodes\sarpg.pwn(11163) : error 001: expected token: ";", but found ":"
D:\PROG\gta_nst\sampsrv\SA-RPG\gamemodes\sarpg.pwn(11163) : error 029: invalid expression, assumed zero
D:\PROG\gta_nst\sampsrv\SA-RPG\gamemodes\sarpg.pwn(11163) : fatal error 107: too many error messages on one line
It's a dialog response code, and here's the dialogid:
pawn Код:
case 111:
{
if(response)
{
new str[128],sctring[2000];
format(str,sizeof(str),"<< Transport >>\n\n");
strcat(sctring,str);
format(str,sizeof(str),"To drive a car you need a driving license, to fly with a helicopter -\n");
strcat(sctring,str);
format(str,sizeof(str),"flying license. All the transport needs fuel, get it from gas stations.\n");
strcat(sctring,str);
format(str,sizeof(str),"If you don't follow the road laws, you can get fined.\n\n");
strcat(sctring,str);
format(str,sizeof(str),"<< Work >>\n\n");
strcat(sctring,str);
format(str,sizeof(str),"There are many jobs. You can get one at the city hall.\n");
strcat(sctring,str);
format(str,sizeof(str),"For example taxi driver, mechanic, etc.");
strcat(sctring,str);
ShowPlayerDialog(playerid,112,DIALOG_STYLE_MSGBOX,"Transport p. 2",sctring,"Next >>","Menu");
else // Line 11157 - Error
{
ShowPlayerDialog(playerid,61,DIALOG_STYLE_LIST,"Help","[1] Communication\n[2] Players list\n[3] Тransport\n[4] Common\n[5] Transport p. 2\n[6] Guns and killing\n[7] Role Play\n[8] First Steps\n[9] First Steps Part 2\n[10] First Steps Part 3\n[11] PayDay\n\
[12] Faction PayDay\n[13] Business\n[14] Location\n[15] Law-Abiding\n[16] House\n[17] House Part 2","Next >>","Close");
}
}
case 112: // Another dialogid, got other 5 errors!
I've noticed that I should add a } before the line 11157, but when I compile it with the '}', my compiler crashes.
Please help me? Giving out reputation to who helps..
Re: Please help (5 errors) [Giving reputation] -
Crystyan12 - 09.10.2011
try this way, must work
pawn Код:
case 111:
{
if(response)
{
new str[128],sctring[2000];
format(str,sizeof(str),"<< Transport >>\n\n");
strcat(sctring,str);
format(str,sizeof(str),"To drive a car you need a driving license, to fly with a helicopter -\n");
strcat(sctring,str);
format(str,sizeof(str),"flying license. All the transport needs fuel, get it from gas stations.\n");
strcat(sctring,str);
format(str,sizeof(str),"If you don't follow the road laws, you can get fined.\n\n");
strcat(sctring,str);
format(str,sizeof(str),"<< Work >>\n\n");
strcat(sctring,str);
format(str,sizeof(str),"There are many jobs. You can get one at the city hall.\n");
strcat(sctring,str);
format(str,sizeof(str),"For example taxi driver, mechanic, etc.");
strcat(sctring,str);
ShowPlayerDialog(playerid,112,DIALOG_STYLE_MSGBOX,"Transport p. 2",sctring,"Next >>","Menu");
}
else // Line 11157 - Error
{
ShowPlayerDialog(playerid,61,DIALOG_STYLE_LIST,"Help","[1] Communication\n[2] Players list\n[3] Тransport\n[4] Common\n[5] Transport p. 2\n[6] Guns and killing\n[7] Role Play\n[8] First Steps\n[9] First Steps Part 2\n[10] First Steps Part 3\n[11] PayDay\n\
[12] Faction PayDay\n[13] Business\n[14] Location\n[15] Law-Abiding\n[16] House\n[17] House Part 2","Next >>","Close");
}
}
case 112: // Another dialogid, got other 5 errors!
Re: Please help (5 errors) [Giving reputation] -
GangsTa_ - 09.10.2011
I'll try it later.
Re: Please help (5 errors) [Giving reputation] -
aRoach - 09.10.2011
pawn Код:
case 111:
{
if(response)
{
new sctring[2000];
strcat(sctring,"<< Transport >>\n\n");
strcat(sctring,"To drive a car you need a driving license, to fly with a helicopter -\n");
strcat(sctring,"flying license. All the transport needs fuel, get it from gas stations.\n");
strcat(sctring,"If you don't follow the road laws, you can get fined.\n\n");
strcat(sctring,"<< Work >>\n\n");
strcat(sctring,"There are many jobs. You can get one at the city hall.\n");
strcat(sctring,"For example taxi driver, mechanic, etc.");
ShowPlayerDialog(playerid,112,DIALOG_STYLE_MSGBOX,"Transport p. 2",sctring,"Next >>","Menu");
else // Line 11157 - Error
{
ShowPlayerDialog(playerid,61,DIALOG_STYLE_LIST,"Help","[1] Communication\n[2] Players list\n[3] Тransport\n[4] Common\n[5] Transport p. 2\n[6] Guns and killing\n[7] Role Play\n[8] First Steps\n[9] First Steps Part 2\n[10] First Steps Part 3\n[11] PayDay\n\
[12] Faction PayDay\n[13] Business\n[14] Location\n[15] Law-Abiding\n[16] House\n[17] House Part 2","Next >>","Close");
}
}
}
case 112: // Another dialogid, got other 5 errors!
Re: Please help (5 errors) [Giving reputation] -
GangsTa_ - 14.10.2011
Pawno crashes to both of variants. Help please!
Re: Please help (5 errors) [Giving reputation] -
GangsTa_ - 14.10.2011
Nevermind this topic.