#1

Hi guys why every time i close the "Dialog", give me a Server Closed The Connection.

This is a code: stock ShowPlayerDamages(playerid, toid)
{
new
str[1000], str1[500], count = 0, name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
for(new id = 0; id < MAX_DAMAGES; id++)
{
if(DamageInfo[playerid][id][dmgDamage] != 0) count++;
}
if(count == 0) return ShowPlayerDialog(toid, DIALOG_DAMAGE, DIALOG_STYLE_LIST, name, "Non hai subito nessun danno...", "Chiudi", "");
else if(count > 0)
{
for(new id = 0; id < MAX_DAMAGES; id++)
{
if(DamageInfo[playerid][id][dmgDamage] != 0)
{
FORMATtr1("%d danno da %s al %s (Kevlarhit: %d) %d s fa\n", DamageInfo[playerid][id][dmgDamage], GetWeaponNameEx(DamageInfo[playerid][id][dmgWeapon]), GetBodypartName(DamageInfo[playerid][id][dmgBodypart]), DamageInfo[playerid][id][dmgKevlarhit], gettime() - DamageInfo[playerid][id][dmgSeconds]);
strcat(str, str1);
}
}
ShowPlayerDialog(toid, DIALOG_DAMAGE, DIALOG_STYLE_LIST, name, str, "Chiudi", "");
}
return 1;
}
Reply
#2

First off use the [code] tag for code (or php). It makes it much easier to read.

Furthermore, can you show us the related code in OnDialogResponse? The issue is most likely in there as it is called when you interact with the dialog.
Reply
#3

Don't exist on this script the DialogResponse.
I just downloaded this script.
Reply
#4

Quote:
Originally Posted by kevi11
Посмотреть сообщение
Don't exist on this script the DialogResponse.
I just downloaded this script.
Do you have any filterscripts running?
It seems like another script responds to this dialog, as a player shouldn't be kicked for nothing.

There should be a define somewhere at the beginning of the script, something like this:

Код:
#define DIALOG_DAMAGE 1
where 1 is the ID (just an example here). Try changing it to something else to see if that is the cause.

If that works, check your filterscripts if they use the same ID - which will result in conflicts.
You should change the IDs so they do not overlap anymore.
Reply
#5

Yeah, i rune some filterscripts, now i will try with ur method.
Reply
#6

PHP and CODE tags exist for a reason on this forum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)