Server Closed Connection -
Akcent_Voltaj - 11.03.2013
everytime i click second button to close dialog i get 'server closed connection'its from here.i dont get any errors/warnings..
PHP код:
if( dialogid == Dialog_BuyLicense )
{
if( response )//daca apasa primul buton
{
if(listitem == 0 ) //Fishin
{
if(PlayerInfo[playerid][pFishLic] == 0)
{
if(GetPlayerCash(playerid) >= 20000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a fishing license for 20000Lei !");
GivePlayerCash(playerid, - 20000);
PlayerInfo[playerid][pFishLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 20000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a fishing license !");
}
return 1;
}
if(listitem == 1 ) //Weapon
{
if(PlayerInfo[playerid][pGunLic] == 0)
{
if(GetPlayerCash(playerid) >= 60000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a weapon license for 60000Lei !");
GivePlayerCash(playerid, - 200);
PlayerInfo[playerid][pGunLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 60000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a weapon license !");
}
return 1;
}
if(listitem == 2 ) //Sailing
{
if(PlayerInfo[playerid][pBoatLic] == 0)
{
if(GetPlayerCash(playerid) >= 30000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a sailing license for 30000Lei !");
GivePlayerCash(playerid,-30000);
PlayerInfo[playerid][pBoatLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 30000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a sailing license !");
}
return 1;
}
if(listitem == 3 ) //Flying
{
if(PlayerInfo[playerid][pFlyLic] == 0)
{
if(GetPlayerCash(playerid) >= 50000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a flying license for 50000Lei !");
GivePlayerCash(playerid, - 50000);
PlayerInfo[playerid][pFlyLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 50000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a flying license !");
}
return 1;
}
}
}
Re: Server Closed Connection -
Vince - 11.03.2013
http://*******/Y5UWGZ
Re: Server Closed Connection -
Akcent_Voltaj - 11.03.2013
i did make the idention..and nothing still same..
Re: Server Closed Connection -
Denying - 11.03.2013
Identation just makes you read the code more easily and notice (if there are) problems/mistakes.
It does not make your code work better.
EDIT: Re-post the idented code.
Re: Server Closed Connection -
Akcent_Voltaj - 11.03.2013
pawn Код:
if( dialogid == Dialog_BuyLicense )
{
if( response )//daca apasa primul buton
{
if(listitem == 0 ) //Fishin
{
if(PlayerInfo[playerid][pFishLic] == 0)
{
if(GetPlayerCash(playerid) >= 20000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a fishing license for 20000Lei !");
GivePlayerCash(playerid, - 20000);
PlayerInfo[playerid][pFishLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 20000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a fishing license !");
}
return 1;
}
if(listitem == 1 ) //Weapon
{
if(PlayerInfo[playerid][pGunLic] == 0)
{
if(GetPlayerCash(playerid) >= 60000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a weapon license for 60000Lei !");
GivePlayerCash(playerid, - 200);
PlayerInfo[playerid][pGunLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 60000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a weapon license !");
}
return 1;
}
if(listitem == 2 ) //Sailing
{
if(PlayerInfo[playerid][pBoatLic] == 0)
{
if(GetPlayerCash(playerid) >= 30000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a sailing license for 30000Lei !");
GivePlayerCash(playerid,-30000);
PlayerInfo[playerid][pBoatLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 30000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a sailing license !");
}
return 1;
}
if(listitem == 3 ) //Flying
{
if(PlayerInfo[playerid][pFlyLic] == 0)
{
if(GetPlayerCash(playerid) >= 50000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a flying license for 50000Lei !");
GivePlayerCash(playerid, - 50000);
PlayerInfo[playerid][pFlyLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 50000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a flying license !");
}
return 1;
}
}
}
same thing like i told you!
Re: Server Closed Connection -
IceCube! - 11.03.2013
Wrong.
Re: Server Closed Connection -
DiGiTaL_AnGeL - 11.03.2013
Maybe the dialog's id is the same with another dialog.
Re: Server Closed Connection -
Akcent_Voltaj - 11.03.2013
i dont know..if anyone knows.plz edit my dialog....