pickup crashes the server -
lucamsx - 14.11.2015
i've made a pickup opening the shop menu. picking it up crashes the server, but only when my friend do it. i can do it and nothing happens.
Код:
new GShop;
GShop = CreatePickup(1318, 1, 1690.5791,-1506.7697,13.5469, -1);
Код:
if(pickupid == GShop)
{
if(PlayerInfo[playerid][pMember] == 0) return ShowPlayerDialog(playerid, 518, DIALOG_STYLE_MSGBOX, "Shop", "You cannot buy anything in this shop.", "Close", "");
if(IsCop[playerid] == 1) return ShowPlayerDialog(playerid, 519, DIALOG_STYLE_MSGBOX, "Shop", "You cannot buy anything in this shop.", "Close", "");
ShowPlayerDialog(playerid, 520, DIALOG_STYLE_LIST, "Shop", "Mask - x1 - $750\nSpray - 1500 - $250\nBaseball - x1 -$600");
return 1;
}
i've used crashdetect, and that's what i got:
Код:
[20:35:42] [debug] Server crashed while executing testgfs57.amx
[20:35:42] [debug] AMX backtrace:
[20:35:42] [debug] #0 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #1 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #2 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #3 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #4 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #5 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #6 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #7 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #8 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #9 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #10 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #11 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #12 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #13 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #14 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #15 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #16 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #17 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #18 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #19 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #20 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #21 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #22 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #23 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #24 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #25 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #26 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #27 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #28 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #29 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #30 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #31 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #32 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #33 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #34 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #35 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #36 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #37 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #38 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #39 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #40 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #41 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #42 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #43 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #44 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #45 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #46 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #47 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #48 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #49 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #50 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #51 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #52 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #53 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #54 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #55 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #56 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #57 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #58 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #59 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #60 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #61 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #62 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #63 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #64 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #65 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #66 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #67 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #68 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #69 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #70 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #71 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #72 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #73 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #74 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #75 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #76 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #77 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #78 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #79 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #80 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #81 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #82 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #83 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #84 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #85 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #86 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #87 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #88 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #89 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #90 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #91 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #92 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #93 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #94 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #95 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #96 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #97 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #98 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #99 00000001 in ?? (1, 5) from testgfs57.amx
[20:35:42] [debug] #100 00000001 in public OnPlayerPickUpPickup (1, 5) from testgfs57.amx
edit: i've discovered it does not crash player with id 0. i'll try it in a moment with more id's.
Re: pickup crashes the server -
AIped - 14.11.2015
try disabling parts of your code and see if it still happens then so you could outrule the problems.
For example ..disable this part
pawn Код:
/*
if(pickupid == GShop)
{
if(PlayerInfo[playerid][pMember] == 0) return ShowPlayerDialog(playerid, 518, DIALOG_STYLE_MSGBOX, "Shop", "You cannot buy anything in this shop.", "Close", "");
if(IsCop[playerid] == 1) return ShowPlayerDialog(playerid, 519, DIALOG_STYLE_MSGBOX, "Shop", "You cannot buy anything in this shop.", "Close", "");
ShowPlayerDialog(playerid, 520, DIALOG_STYLE_LIST, "Shop", "Mask - x1 - $750\nSpray - 1500 - $250\nBaseball - x1 -$600");
return 1;
}
*/
And then go online and try the pickup and see if it crashes...
If it doesnt..then its something in the code you just disabled.
Re: pickup crashes the server -
lucamsx - 14.11.2015
i've removed that part and now its not crashing.
but is there something wrong with the code?
Re: pickup crashes the server -
AIped - 14.11.2015
i cant see why theres something wrong with that part.
But the next step would be disabling SMALL parts of that code.
EDIT: Try this;
pawn Код:
if(pickupid == GShop)
{
if(PlayerInfo[playerid][pMember] == 0) return ShowPlayerDialog(playerid, 518, DIALOG_STYLE_MSGBOX, "Shop", "You cannot buy anything in this shop.", "Close", "");
if(IsCop[playerid] == 1) return ShowPlayerDialog(playerid, 519, DIALOG_STYLE_MSGBOX, "Shop", "You cannot buy anything in this shop.", "Close", "");
else
{
ShowPlayerDialog(playerid, 520, DIALOG_STYLE_LIST, "Shop", "Mask - x1 - $750\nSpray - 1500 - $250\nBaseball - x1 -$600");
}
return 1;
}
or maybe you have the same dialogid in some other script ?
Re: pickup crashes the server -
lucamsx - 14.11.2015
okay nevermind, that was my own stupidity... i forgot about buttons in last dialog

geez
Re: pickup crashes the server -
AIped - 14.11.2015
What ? LOL oh yea i see it too XD shame on me.