Invalid expressions -
cre8ticity - 28.10.2010
Hey, help me fix this, don't understand why I am getting these errors.
errors :
Код:
C:\Documents and Settings\Joe\Desktop\London Roleplay\gamemodes\gf.pwn(26264) : warning 217: loose indentation
C:\Documents and Settings\Joe\Desktop\London Roleplay\gamemodes\gf.pwn(26271) : warning 217: loose indentation
C:\Documents and Settings\Joe\Desktop\London Roleplay\gamemodes\gf.pwn(26271) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Joe\Desktop\London Roleplay\gamemodes\gf.pwn(26272) : warning 217: loose indentation
C:\Documents and Settings\Joe\Desktop\London Roleplay\gamemodes\gf.pwn(26292) : warning 217: loose indentation
C:\Documents and Settings\Joe\Desktop\London Roleplay\gamemodes\gf.pwn(26297) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Joe\Desktop\London Roleplay\gamemodes\gf.pwn(26325) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Joe\Desktop\London Roleplay\gamemodes\gf.pwn(26350) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
the code :
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
if(listitem == 1)
{
new listitems[] = "1\tMeta Gaming\n2\tMeat Grinder\n3\tMilking Goats\n4\tMortified Greyhounds";
SendClientMessage(playerid,COLOR_GREEN,"Correct Answer!");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"What is MG?:",listitems,"Select","Cancel");
}
if(listitem == 2)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
if(listitem == 3)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
}
}
if(dialogid == 2) // 26264
{
if(response)
{
if(listitem == 0)
{
new listitems[] = "1\tOut Of Click\n2\tOunce of Clay\n3\tOut Of Character\n4\tOlly Of Cows";
` SendClientMessage(playerid,COLOR_GREEN,"Correct Answer!"); // 26271
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"What is OOC?:",listitems,"Select","Cancel"); // 26272
}
if(listitem == 1)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
if(listitem == 2)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
if(listitem == 3)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
}
}
if(dialogid == 3) // 26292
{
if(response)
{
if(listitem == 0
{ // 26297
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
if(listitem == 1)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
if(listitem == 2)
{
new listitems[] = "1\tIn Cook\n2\tIodine Cookery\n3\tIn Character\n4\tIP Cracking";
SendClientMessage(playerid,COLOR_GREEN,"Correct Answer!");
ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"What is IC?:",listitems,"Select","Cancel");
}
if(listitem == 3)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
}
}
if(dialogid == 4)
{
if(response)
{
if(listitem == 0
{ // 26325
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
if(listitem == 1)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
if(listitem == 2)
{
SendClientMessage(playerid,COLOR_GREEN,"Correct Answer!");
TutTime[playerid] = 0; PlayerInfo[playerid][pTut] = 1;
gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0;
TogglePlayerControllable(playerid, 1);
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
}
if(listitem == 3)
{
SendClientMessage(playerid,COLOR_RED,"Wrong Answer, You have been kicked");
Kick(playerid);
}
}
}
return 1; //26350
}
Re: Invalid expressions -
Crayon - 28.10.2010
Loose indentation means you didnt indent your lines properly, so hit the back space where the error occurs and indent the lines until the error dissapears.
Second show us what line(s) the other errors occur at.
Re: Invalid expressions -
cre8ticity - 28.10.2010
I know what loose indentations are, I wonna know how to fix the errors. I have marked the lines of the errors on there.
Re: Invalid expressions -
Scenario - 28.10.2010
Oh... Here we go again.
1) Your indentation is horrible, learn to indent better or you will never succeed in scripting.
2) Obviously, you haven't looked at your code. I see 3 obvious mistakes, should I point them out to you?
Re: Invalid expressions -
(SF)Noobanatior - 28.10.2010
Код:
new listitems[64] = "1\tOut Of Click\n2\tOunce of Clay\n3\tOut Of Character\n4\tOlly Of Cows"; //26270
if(listitem == 0)
{ // 26297
and
if(listitem == 0)
{ // 26325
change the line to what i put here
Re: Invalid expressions -
cre8ticity - 28.10.2010
Sorry, it was late at night and I was tired, found the error straight away in the morning today though lol.