Edit: after further discussion on SourcePawn's GitHub, this is actually a compiler bug.
https://github.com/alliedmodders/sourcepawn/issues/122
...
I am using the latest SourceMod, Linux Server, Half-Life 2: DM. I am simply trying to create a database, and it does, but for some reason, if I use a timer, and then call StrEqual...it makes a SECOND empty database with whatever name is in the first field of "StrEqual"
Here is an image from FTP showing the two files being made:
http://imgur.com/GFSrYC2l.png
The code below will reproduce it...
PHP Code:
#include <sourcemod>
new Handle:g_hDB = INVALID_HANDLE;
public OnPluginStart()
{
InitDB();
CreateTimer(3.0, wtf_is_going_on);
}
stock Action:wtf_is_going_on(Handle:timer)
{
if(StrEqual("it_makes_an_empty_database_with_whatever_is_here", "")) {}
}
stock InitDB()
{
new String:error[255];
g_hDB = SQLite_UseDatabase("my_database", error, sizeof(error));
}