Compiler crashes with this code! Help -
ShawnMiller1337 - 31.01.2012
What is wrong with this code that is making my pawn compiler crash?
pawn Код:
if(dialogid == SUBMENU)
{
if(!response) return 1;
switch(listitem)
{
case 0;
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {00FF00} DOCKED"};
SubDocked[i] = 0;
}
}
case 1;
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {FF0000} UN-DOCKED"};
SubDocked[i] = 1;
}
}
}
}
Re: Compiler crashes with this code! Help -
henry jiggy - 31.01.2012
It's case 0: and case 1:
not case 0; and case 1;
Re: Compiler crashes with this code! Help -
Элиот - 31.01.2012
pawn Код:
if(dialogid == SUBMENU)
{
if(!response) return 1;
if(response)
{
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {00FF00} DOCKED"};
SubDocked[playerid] = 0;
}
}
case 1:
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {FF0000} UN-DOCKED"};
SubDocked[playerid] = 1;
}
}
}
}
}
I found 3 mistakes, haha.
Re: Compiler crashes with this code! Help -
ShawnMiller1337 - 31.01.2012
still crashing
pawn Код:
if(dialogid == SUBMENU)
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {00FF00}DOCKED"};
SubDocked[i] = 0;
}
}
case 1:
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {FF0000}UN-DOCKED"};
SubDocked[i] = 1;
}
}
}
}
Re: Compiler crashes with this code! Help -
Элиот - 31.01.2012
Try my code. ;]]
Re: Compiler crashes with this code! Help -
henry jiggy - 31.01.2012
EDIT:
D: didnt notice there was no i variable
damn you fasties.
Re: Compiler crashes with this code! Help -
ShawnMiller1337 - 31.01.2012
Still crashes
pawn Код:
if(dialogid == SUBMENU)
{
if(!response) return 1;
if(response)
{
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {00FF00} DOCKED"};
SubDocked[playerid] = 0;
}
}
case 1:
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {FF0000} UN-DOCKED"};
SubDocked[playerid] = 1;
}
}
}
}
}
Re: Compiler crashes with this code! Help -
Элиот - 31.01.2012
Perhaps you have lost a bracket.
Re: Compiler crashes with this code! Help -
ShawnMiller1337 - 31.01.2012
well I removed the coding and it compiles fine , but when I add that coding in it crashes the compiler. I dont know what is causing it
Re: Compiler crashes with this code! Help -
Элиот - 31.01.2012
LOL i found another mistake in this code.
pawn Код:
if(dialogid == SUBMENU)
{
if(!response) return 1;
if(response)
{
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {00FF00} DOCKED");
SubDocked[playerid] = 0;
}
}
case 1:
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
SendClientMessageEx(playerid, COLOR_WHITE,"Submarine is now currently {FF0000} UN-DOCKED");
SubDocked[playerid] = 1;
}
}
}
}
}