SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 11/05/2018, 11:46 PM   #1
Ducati
Big Clucker
 
Join Date: Jan 2018
Posts: 67
Reputation: 28
Default Clothes system crashing my server

I'm not sure how much info is required here to get help with this, but I'm having trouble pinpointing exactly what is causing my server to crash, even though I know the line which is causing it.

Ive spent hours on my test server adding, editing, removing about 30 different clothing items, resizing them, moving them around, etc. and cannot recreate the crash. However, when used on my main server it randomly causes a server crash (happened first time at 28 players, and a second time (after I thought id fixed it) at 14 players).
The problem is that I have no idea which player did what in order to cause the crash, so cannot recreate it myself in order to start fixing the problem.


I know this isn't much information but is it enough for any of you out there to give me some idea what could be causing this line to create a crash?
Code:
SaveClothingObjects(playerid, Index, clothid, bone, Float:c_foffsetX, Float:c_foffsetY, Float:c_foffsetZ, Float:c_fRotX, Float:c_fRotY, Float:c_fRotZ, Float:c_fScaleX, Float:c_fScaleY, Float:c_fScaleZ)
{
    new F1[15],F2[15],F3[15],F4[15],F5[15],F6[15],F7[15],F8[15],F9[15],F10[15],F11[15];

    if(dini_Exists(UserClothPath(playerid)))
    {
    format(F1,15,"O_Model_%d",Index);
    dini_IntSet(UserClothPath(playerid),F1,clothid);

    format(F2,15,"O_Bone_%d",Index);///////////CRASHES SERVER
    dini_IntSet(UserClothPath(playerid),F2,bone);

	format(F3,15,"O_OffX_%d",Index);
	dini_FloatSet(UserClothPath(playerid),F3,c_foffsetX);

    format(F4,15,"O_OffY_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F4,c_foffsetY);

    format(F5,15,"O_OffZ_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F5,c_foffsetZ);

    format(F6,15,"O_RotX_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F6,c_fRotX);

    format(F7,15,"O_RotY_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F7,c_fRotY);

    format(F8,15,"O_RotZ_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F8,c_fRotZ);

    format(F9,15,"O_ScaleX_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F9,c_fScaleX);

    format(F10,15,"O_ScaleY_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F10,c_fScaleY);

    format(F11,15,"O_ScaleZ_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F11,c_fScaleZ);
    }
}
Ducati is offline   Reply With Quote
Old 12/05/2018, 05:10 AM   #2
Dice_
Huge Clucker
 
Dice_'s Avatar
 
Join Date: Sep 2015
Location: Indonesia
Posts: 450
Reputation: 57
Default Re: Clothes system crashing my server

Compile your scripts with -d3 and post the last server log here when crashed.


and.. why are you still using dini? SQL is better option.
Dice_ is offline   Reply With Quote
Old 13/05/2018, 01:28 AM   #3
Ducati
Big Clucker
 
Join Date: Jan 2018
Posts: 67
Reputation: 28
Default Re: Clothes system crashing my server

Quote:
Originally Posted by Dice_ View Post
Compile your scripts with -d3 and post the last server log here when crashed.


and.. why are you still using dini? SQL is better option.
I stupidly rebooted the server before checking/saving the logs and it overwrote (ultra-h). I cant manage to recreate the problem so I cant get the crashdetect info again

I'm using dini because I don't know enough about SQL to re-script it to save with MySQL.

Any ideas what the problem could possibly be from the line shown above? like multiple clothes attached to the same bone, etc
Ducati is offline   Reply With Quote
Old 13/05/2018, 01:53 AM   #4
andrejc999
Huge Clucker
 
Join Date: Jun 2014
Posts: 220
Reputation: 6
Default Re: Clothes system crashing my server

Quote:
Originally Posted by Dice_ View Post
Compile your scripts with -d3 and post the last server log here when crashed.


and.. why are you still using dini? SQL is better option.
A bit off topic but what is called compiling with -d3?
andrejc999 is offline   Reply With Quote
Old 13/05/2018, 10:51 AM   #5
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,920
Reputation: 258
Default Re: Clothes system crashing my server

Quote:
Originally Posted by andrejc999 View Post
A bit off topic but what is called compiling with -d3?
https://github.com/Zeex/samp-plugin-...ith-debug-info
__________________
actor_plus - v5.0.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion is offline   Reply With Quote
Old 15/05/2018, 01:33 AM   #6
Ducati
Big Clucker
 
Join Date: Jan 2018
Posts: 67
Reputation: 28
Default Re: Clothes system crashing my server

post is at the bottom now we here
bump
Ducati is offline   Reply With Quote
Old 15/05/2018, 08:21 AM   #7
CodeStyle175
Banned
 
Join Date: Apr 2014
Posts: 455
Reputation: 35
Default Re: Clothes system crashing my server

no dont use dini for clothing items, its slowest possible way to save anything
CodeStyle175 is offline   Reply With Quote
Old 15/05/2018, 09:01 AM   #8
GTLS
High-roller
 
GTLS's Avatar
 
Join Date: Aug 2014
Location: India
Posts: 1,044
Reputation: 115
Default Re: Clothes system crashing my server

Possibly a wrong skin ID or something? - http://wiki.sa-mp.com/wiki/Skins:All

Also, It could be your host (Ultra-H)'s fault. It was not able to handle your server resources or something.

Also, tell me how'd you know that Clothing system is the one causing this problem?
__________________

I don't help for rep. I help cuz I was helped in the past.


Retired from SAMP Scene. Might open SAMP Forums once in a while.

Some treats for ya. Click em
Basic House System
Simple Speedo
Base Login/Register Script

GTLS is offline   Reply With Quote
Old 15/05/2018, 01:25 PM   #9
Ducati
Big Clucker
 
Join Date: Jan 2018
Posts: 67
Reputation: 28
Default Re: Clothes system crashing my server

Quote:
Originally Posted by GTLS View Post
Possibly a wrong skin ID or something? - http://wiki.sa-mp.com/wiki/Skins:All

Also, It could be your host (Ultra-H)'s fault. It was not able to handle your server resources or something.

Also, tell me how'd you know that Clothing system is the one causing this problem?

All the skin IDs seem correct, they preview properly in the class selection and work properly when spawned, I was also thinking it could be an ultra-H issue, I'm having trouble with it writing other info too (like AKA information to a .txt after 65 lines) but I cant think of any way around that without changing host

I know its the clothing because I saved the 'problem line' it gave in the server log before accidentally clearing the rest of the information from it, also the problem only occurs when ive got the clothes cmds enabled.
Ran the server for 3 weeks without the clothes and it didn't crash once, then when I turn it on it crashes within a few hours.

I'm piss poor at MySQL related stuff so I cant even upgrade it from dini
Ducati 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
[Help] MySQL Vehicle system crashing server Sibuscus Scripting Help 0 26/03/2017 01:19 PM
MySQL register system // server crashing HJones Scripting Help 6 18/03/2015 04:57 PM
MySQL system crashing my server. tuuler Scripting Help 0 26/06/2014 03:30 PM
Server crashing when i add the biz system iThePunisher Scripting Help 10 16/04/2014 01:14 PM
Gate System crashing the Server damian123 Scripting Help 5 26/10/2013 08:48 PM


All times are GMT. The time now is 06:10 PM.


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