AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Closing DBI at plugin_end (https://forums.alliedmods.net/showthread.php?t=132177)

t3hNox 07-12-2010 16:59

Closing DBI at plugin_end
 
Hi,
I need a quick help. I'm working on some mod and I've found out (or at least I think so) if SQL data base is closed incorrectly on map change, server crashes.

With this code, I get tag mismatch warning and server crashes once in ~five times on map change:
PHP Code:

public plugin_end() {
    if(
dbc 0) {     
        
dbi_close(dbc
    }


However, with this plugin completes fine but server always crashes:
PHP Code:

public plugin_end() {
    if(
dbc) {     
        
dbi_close(dbc
    }


Any ideas ? :?

fang 07-12-2010 17:15

Re: Closing DBI at plugin_end
 
Use SQLx :X More code but it works better.

t3hNox 07-12-2010 17:25

Re: Closing DBI at plugin_end
 
Well, unfortunately it won't be possible as I'm working with an already made plugin. And besides that I'm not that good at scripting.

t3hNox 07-14-2010 07:07

Re: Closing DBI at plugin_end
 
*bump*

Sylwester 07-14-2010 07:15

Re: Closing DBI at plugin_end
 
You are supposed to wait 2 weeks before you can use bump...
Even if you are working on finished plugin, there is nothing wrong with converting it from dbi to sqlx. If you can't do it yourself, then post it (in suggestions/requests) and wait for someone else to do it for you.


All times are GMT -4. The time now is 07:05.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.