SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 21/06/2020, 12:16 PM   #1
jasperschellekens
High-roller
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Holland
Posts: 1,077
Reputation: 126
Default FCNPC crashing player clients

Hi everyone, title says it all. I switched to FCNPC a few days ago becuase it seems a lot better than rnpc when properly used.

Allthough, I'm running into some problems now. Yesterday, the clients of everyone would just crash whenever they joined the test server. It just happened a few secs after connecting.
If you were fast enough to type your password, it would not crash when it spawned you.

Further investigation to this matter had me discovering that it is caused by my NPC's.
I have considered the steps I have done.
1. Switched to FCNPC
2. Converted all normal NPC's (E.g traders, safezone NPC's and questgivers) to FCNPC.
3. Changed the location for all NPC's to match the new map.
4. Converted all Zombie NPC's.

And part 4 is where the crashes start happening.
And I really can't wrap my head around it. Could it be the fact they use custom skins? Or is it related to my coding?

Here are some entries from where I load my NPC's:
pawn Code:
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('1','1697.5272','1027.8324','307.9102','320.3279','0','0','3','John_Greybrook','1','NONE','NONE');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('2','1702.4653','1017.1572','308.2149','22.2238','0','0','133','Paul_Brooks','1','BAR','BARMAN_IDLE');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('3','1682.7429','1072.3427','312.035','4.0504','0','0','128','Jason_Greybrook','1','PED','Gun_2_IDLE');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('50','1652.779785','1441.734985','308.113342','228.991134','0','0','20108','Zombie2','2','PED','cower');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('51','1658.249633','1425.884277','308.135375','251.792144','0','0','20112','Zombie3','2','SWAT','gnstwall_injurd');
INSERT INTO "NPCS" ("ID","POSX","POSY","POSZ","ANGLE","WORLD","INTERIOR","SKIN","NAME","PATHID","ANIMLIB","ANIM") VALUES ('52','1669.096679','1469.63269','308.122283','279.472595','0','0','20116','Zombie4','2','SWAT','gnstwall_injurd');

So when I only add ID 1 2 and 3, it's fine. But when I add some zombies, it freaks out.

I wonder now, could it be related to the custom skins? Or my code?
Here is my code:
https://pastebin.com/9weVWXfL

Note: Server log doesn't show anything whatsoever, this is purely a client crash caused by the server.

Here is some more information about the crash:
Code:
SA-MP 0.3.DL-R1
Exception At Address: 0x0048C3A9
Base: 0x03A80000

Registers:
EAX: 0x00000000	EBX: 0x0000FFFF	ECX: 0x0177EDFC	EDX: 0x00000000
ESI: 0x104AA860	EDI: 0x000004EE	EBP: 0x0177EEAC	ESP: 0x0177ED80
EFLAGS: 0x00010246

Stack:
+0000: 0x0177EDFC   0x00000000   0x000004EE   0x0177EEAC
+0010: 0x00000000   0x00000000   0x00000000   0x00000000
+0020: 0x00000000   0x00000000   0x00000000   0x00000000
+0030: 0x00000000   0x00000000   0x00000000   0x00000000
+0040: 0x00000000   0x00000000   0x00000000   0x00000000
+0050: 0x0000FFFF   0x0000FFFF   0x00000000   0x00000000
+0060: 0x00000000   0x00000000   0x00000000   0x00000000
+0070: 0x00000000   0x00000000   0x14C46040   0x454E4F4E
+0080: 0x00000000   0x00000000   0x00000000   0x094ED000
+0090: 0x14C46000   0x0177EEF8   0x52959B11   0x14C46040
+00A0: 0x0FEB0980   0x14C4C6A0   0x00000000   0x00000000
+00B0: 0x094ED000   0x00000000   0x053E6200   0x00000000
+00C0: 0x7725216C   0x751FF60F   0x00000000   0x0177EE9C
+00D0: 0x008384FA   0xFFFFFFFF   0x00469EF7   0x000004EE
+00E0: 0x0177EEB4   0x03B31EEE   0x03B320A4   0x755E9010
+00F0: 0x00000009   0x0177F028   0x00000000   0x0177EEB4
+0100: 0x00000004   0xFFFFD8F0   0x00000000   0x03B9E7F7
+0110: 0x00000000   0x0177EE6C   0x0177E744   0x0177F22C
+0120: 0x03B793A4   0x03B9F428   0x00000000   0x16977408
+0130: 0x03B20ABF   0x03B9E7F4   0x0177F028   0x03B2CED9
+0140: 0x0177F028   0x0177F228   0xFFFFFF01   0x0177F244
+0150: 0x0177F238   0x03A9A65C   0x0177F128   0x0177F028
+0160: 0x40833333   0x00000001   0x00000001   0x00000001
+0170: 0x00000000   0x00000000   0x16863AD0   0x0404A53D
+0180: 0x01000101   0x181A0254   0x00000000   0x40833333
+0190: 0x000000A8   0x000000A8   0x000000A4   0x0177F244
+01A0: 0x00000000   0x094ED000   0x00001214   0x181A3230
+01B0: 0x0177EF48   0x5295A27D   0x00000000   0x181A3200
+01C0: 0x181A3230   0x181A3200   0x0177EF64   0x5296512E
+01D0: 0x00000014   0x0EACA150   0x00000000   0x0177EFF8
+01E0: 0x0EACA180   0x0177EF9C   0x0177EF9C   0x52AB373D
+01F0: 0x094F2C80   0x0177F088   0x0EBABE80   0x00000000
+0200: 0x52A374D3   0x094B8000   0x0F7A8220   0x0F7A9A98
+0210: 0x053DE430   0x52A37310   0x053E6248   0x0177F038
+0220: 0x52A374D3   0x094B8000   0x0EACA150   0x0FF251A8
+0230: 0x053DE430   0x52A37310   0x0EC1E2E0   0x52A38390
+0240: 0x0EA93A80   0x0177F400   0x00000000   0x00000000
+0250: 0x00000000   0x00000000   0x0F9B6150   0x00000000
+0260: 0x00000005   0x0001C6A0   0x00000520   0x00000000
+0270: 0x00000000   0x00000000   0x0F9B6260   0x00000000

SCM Op: 0x4EE, lDbg: 1 LastRendObj: 59830

Game Version: EU 1.0

State Information: Ped Context: 0
P593 (0,0) P594 (0,0) P595 (0,0) 
P596 (17,0) P597 (0,0) P598 (0,0) P599 (0,0)
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!


Undead Wasteland Roleplay - The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
Discord - Website
jasperschellekens is offline   Reply With Quote
Old 21/06/2020, 12:51 PM   #2
Slawiii
Huge Clucker
 
Slawiii's Avatar
 
Join Date: May 2015
Location: Morocco, Missour
Posts: 293
Reputation: 16
Default Re: FCNPC crashing player clients

Are you using crashdetect ?
Slawiii is offline   Reply With Quote
Old 21/06/2020, 01:54 PM   #3
jasperschellekens
High-roller
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Holland
Posts: 1,077
Reputation: 126
Default Re: FCNPC crashing player clients

I am. Crash detect does not detect any client crashes AFAIK
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!


Undead Wasteland Roleplay - The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
Discord - Website
jasperschellekens is offline   Reply With Quote
Old 21/06/2020, 02:42 PM   #4
Slawiii
Huge Clucker
 
Slawiii's Avatar
 
Join Date: May 2015
Location: Morocco, Missour
Posts: 293
Reputation: 16
Default Re: FCNPC crashing player clients

which FCNPC version you using?
which SAMP version you using?
Slawiii is offline   Reply With Quote
Old 21/06/2020, 03:39 PM   #5
jasperschellekens
High-roller
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Holland
Posts: 1,077
Reputation: 126
Default Re: FCNPC crashing player clients

FCNPC latest DL version. Considering im using custom objects and skins I am using DL
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!


Undead Wasteland Roleplay - The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
Discord - Website
jasperschellekens is offline   Reply With Quote
Old 21/06/2020, 04:42 PM   #6
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,729
Reputation: 1686
Default Re: FCNPC crashing player clients

Quote:
And I really can't wrap my head around it. Could it be the fact they use custom skins? Or is it related to my coding?
Did you attempt to load them with standard skins yet? That way you can determine if it's related to your coding or the custom skins.
__________________
When the opportunity presents itself to flip-a da table, uh, you flip-a da table.

Discord: Kwarde#8009
Kwarde is offline   Reply With Quote
Old 21/06/2020, 05:14 PM   #7
jasperschellekens
High-roller
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Holland
Posts: 1,077
Reputation: 126
Default Re: FCNPC crashing player clients

Quote:
Originally Posted by Kwarde View Post
Did you attempt to load them with standard skins yet? That way you can determine if it's related to your coding or the custom skins.
I tried that, but wasn't the issue.
So I basically added all npc's back one by one to check whether it was caused by just one of the zombies. And it didn't crash anymore. I really dont get it anymore lol
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!


Undead Wasteland Roleplay - The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
Discord - Website
jasperschellekens is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FCNPC Crashing server. ImNext Scripting Help 10 02/11/2019 05:04 PM
HELP: NPC follow Player using FCNPC. bookknp Scripting Help 3 09/11/2018 09:16 PM
[REP++] Crashing when player kill player Dusan01 Scripting Help 8 18/02/2016 10:39 AM
[Ajuda] FCNPC - npc mirar em player 99fe3rnando Português/Portuguese 3 05/08/2015 12:15 AM
Clients keep crashing - Why, the hell? Striker_Moe Server Support 1 07/07/2009 06:34 PM


All times are GMT. The time now is 08:20 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.