SA-MP Forums Archive
Crash - 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: Crash (/showthread.php?tid=622608)



Crash - Micko123 - 24.11.2016

Why my sam-server.exe exist when I enter this command
PHP код:
CMD:orgsef(playeridparams[])
{
    if(
PlayerInfo[playerid][Admin] < 5)
    {
        
ERROR(playerid"You are not allowed to use this command");
        return 
1;
    }
    new 
orgid;
    if(
sscanf(params"i"orgid))
    {
        
USAGE(playerid"/orgsef [Org ID] - [Sef will be created on your current pos]");
        return 
1;
    }
    if(
OrgInfo[orgid][orgExist])
    {
        
ERROR(playerid"That ID of org does not exist");
        return 
1;
    }
    new 
Float:XFloat:YFloat:Z;
    
GetPlayerPos(playeridXYZ);
    
OrgInfo[orgid][oSef] = 1;
    
OrgInfo[orgid][oSefX] = X;
    
OrgInfo[orgid][oSefY] = Y;
    
OrgInfo[orgid][oSefZ] = Z;
    
OrgLabel(orgid);
    new 
query[200];
    
mysql_format(g_SQLquerysizeof(query), "UPDATE `orgs` SET `Sef` = %d, `SefX` = %f, `SefY` = %f, `SefZ` = %f"1XYZ);
    
mysql_tquery(g_SQLquery);
    
AdminMessage(-1"Admin %s created/edited sef for org");
    return 
1;

It should create label but problem is that my samp-server.exe stops working.. I have no idea why. Nothing in mysql log and nothing in server log..


Re: Crash - Micko123 - 24.11.2016

I tought it might be this OrgLabel function but I deleted it and it still crashes..
Any ideas what to do??


Re: Crash - Pearson - 24.11.2016

Hello
PHP код:
if(OrgInfo[orgid][orgExist]) 
    { 
        
ERROR(playerid"That ID of org does not exist"); 
        return 
1
    } 
Can you explain this code?


Re: Crash - Micko123 - 25.11.2016

If org with that ID does not exist then sef for that org can't be created..


Re: Crash - Micko123 - 25.11.2016

Okay so I tried running crashdetect but problem is that it won't load
Код:
[21:34:25] Server Plugins
[21:34:25] --------------
[21:34:25]  Loading plugin: sscanf
[21:34:25] 

[21:34:25]  ===============================

[21:34:25]       sscanf plugin loaded.     

[21:34:25]          Version:  2.8.2        

[21:34:25]    © 2012 Alex "******" Cole  

[21:34:25]  ===============================

[21:34:25]   Loaded.
[21:34:25]  Loading plugin: streamer
[21:34:25] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[21:34:25]   Loaded.
[21:34:25]  Loading plugin: mysql
[21:34:25]  >> plugin.mysql: R41 successfully loaded.
[21:34:25]   Loaded.
[21:34:25]  Loaded 3 plugins.
Any ideas??

EDIT: I just saw that it is not showing in server.log that crashdetect failed to load and when I start samp-server.exe it says failed.. damn wtf


Re: Crash - IceBilizard - 25.11.2016

Post your Organization enum code.


Re: Crash - Micko123 - 25.11.2016

PHP код:
enum orgInfo
{
    
oID,
    
oName[32],
    
oLeader[25],
    
Float:oExitX,
    
Float:oExitY,
    
Float:oExitZ,
    
Float:oIntX,
    
Float:oIntY,
    
Float:oIntZ,
    
oMember1[25],
    
oMember2[25],
    
oMember3[25],
    
oMember4[25],
    
oMember5[25],
    
oMember6[25],
    
oMember7[25],
    
oMember8[25],
    
oMember9[25],
    
oMember10[25],
    
oSef,
    
oMoney,
    
oDrugs,
    
Float:oSefX,
    
Float:oSefY,
    
Float:oSefZ,
     
oInt,
    
oVW,
    
boolorgExist,

I also try deleting this
PHP код:
new Float:XFloat:YFloat:Z
    
GetPlayerPos(playeridXYZ); 
    
OrgInfo[orgid][oSef] = 1
    
OrgInfo[orgid][oSefX] = X
    
OrgInfo[orgid][oSefY] = Y
    
OrgInfo[orgid][oSefZ] = Z
    
OrgLabel(orgid); 
    new 
query[200]; 
    
mysql_format(g_SQLquerysizeof(query), "UPDATE `orgs` SET `Sef` = %d, `SefX` = %f, `SefY` = %f, `SefZ` = %f"1XYZ); 
    
mysql_tquery(g_SQLquery); 
And still it crashesed..
Any ideas what is problem with crashdetect?? I have 4.17 version.


Re: Crash - Micko123 - 25.11.2016

-FIXED-

I typed this
PHP код:
AdminMessage(-1"Admin %s created/edited sef for org"); 
Insted of this
PHP код:
format(stringsizeof(string), "Admin %s created/edited sef for org"GetName(playerid));
    
AdminMessage(-1string); 
Lol

But I still can't fix crashdetect.. Any ideas??


Re: Crash - Alvitr - 25.11.2016

when crashdetect load failed,
it might show the reason ... or just show failed?


Re: Crash - Micko123 - 25.11.2016

Just failed.. And it is not even written in server.log that it is failed.