Dialog crashes my server
#1

Hello!

I have a filterscript with this code:
Код:
//Definitions somewhere upper
#define D_SALON          4441
#define D_INFO           4442

//Public OnDialogResponse
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == D_SALON)
	{
	    if(!response)
	        return 1;
		if(inputtext[0] == 'B') //Brak pojazdуw
		    return 1;
		    
		new strModel[5], vehicleModel, vehiclePrice;
		strmid(strModel, inputtext, 0, strfind(inputtext, ":", true)-1);
		vehicleModel = strval(strModel);
		vehiclePrice = GetVehiclePrice(GetPVarInt(playerid, "PQuisVeh_SalonID"), vehicleModel);
		
		if(CountPlayerVehicles(playerid) >= MAX_PLAYER_VEHICLES)
			ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "Salon pojazdуw", "Nie możesz posiadać więcej pojazdуw.", "OK", "");
		else if(CheckPlayerMoney(playerid) < vehiclePrice)
		    ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "Salon pojazdуw", "Nie stać Cię na zakup tego pojazdu.", "OK", "");
		else
		{
		    AddVehicle(vehicleModel, playerid);
		    SetPlayerMoney(playerid, CheckPlayerMoney(playerid)-vehiclePrice);
		    SendClientMessage(playerid, C_SUCCESS, "Kupiłeś pojazd! Jak najszybciej go przeparkuj używając komendy /zaparkuj");
		}
		return 1;
	}
	return 0;
}
And these two dialogs:
Код:
ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "Salon pojazdуw", "Nie możesz posiadać więcej pojazdуw.", "OK", "");
ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "Salon pojazdуw", "Nie stać Cię na zakup tego pojazdu.", "OK", "");
Crashes my server after I click button "OK". There is no collisions with other dialog IDs, from other scripts or gamemode. Can somebody help me, please?
Reply


Messages In This Thread
Dialog crashes my server - by Quis - 15.01.2014, 13:56
Re: Dialog crashes my server - by Konstantinos - 15.01.2014, 17:05
Re: Dialog crashes my server - by Quis - 15.01.2014, 18:15

Forum Jump:


Users browsing this thread: 1 Guest(s)