OnPlayerEditObject [ crashdetect ] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerEditObject [ crashdetect ] (
/showthread.php?tid=660677)
OnPlayerEditObject [ crashdetect ] -
IdonTmiss - 10.11.2018
I am doing a system for dynamic X-MAS trees and I've come across this problem....
PHP код:
[debug] #0 00316f58 in public OnPlayerEditObject (playerid=0, playerobject=0, objectid=582, response=1, Float:fX=291.56863, Float:fY=-1514.89966, Float:fZ=23.49372, Float:fRotX=0.00000, Float:fRotY=0.00000, Float:fRotZ=0.00000)
// On this line
xmastree[treeid] = CreateDynamicObject(19076, fX, fY, fZ, fRotX, fRotY, fRotZ);
Re: OnPlayerEditObject [ crashdetect ] -
khRamin78 - 10.11.2018
show us full debug Error and OnPlayerEditObject full please so we can fix that
Re: OnPlayerEditObject [ crashdetect ] -
IdonTmiss - 11.11.2018
PHP код:
if(editing[playerid] == 9)
{
if(response == EDIT_RESPONSE_FINAL)
{
new treeid = 0;
for(new b = 0; b < sizeof(TI); b++) { if(TI[b][tSQLID] != 1) treeid= b + 1; }
DestroyObject(tobject[playerid]);
TreeObject[treeid] = CreateDynamicObject(19076, fX, fY, fZ, fRotX, fRotY, fRotZ); // The line that gets the crashdetect error
TI[treeid][tTreeX] = Float:fX;
TI[treeid][tTreeY] = Float:fY;
TI[treeid][tTreeZ] = Float:fZ;
TI[treeid][jRotX] = Float:fRotX;
TI[treeid][jRotY] = Float:fRotY;
TI[treeid][jRotZ] = Float:fRotZ;
sql_create_xmas_tree(jelkaid);
new str[128];
format(str, sizeof(str), "[INFO]: %s created a TREE ID:%d", GetName(playerid), treeid);
AdminMSG(Yellow, str);
editing[playerid] = 0;
}
if(response == EDIT_RESPONSE_CANCEL)
{
DestroyObject(jobjekat[playerid]);
editing[playerid] = 0;
}
}