28.05.2015, 13:12
Hey all,
I have got warning 213: tag mismatch
and this is the code
there are some screenshots for more info if I'm not posted it here
I have got warning 213: tag mismatch
Код:
D:\Program Files\Rockstar Games\GTA San Andreas\server\pawno\include\bgedition.inc(211) : warning 213: tag mismatch D:\Program Files\Rockstar Games\GTA San Andreas\server\pawno\include\bgedition.inc(212) : warning 213: tag mismatch D:\Program Files\Rockstar Games\GTA San Andreas\server\pawno\include\bgedition.inc(221) : warning 213: tag mismatch
Код:
#define SQLTYPE_MYSQL 1
#define SQLTYPE_SQLITE 2
#define SQLTABLE_ACTION_CREATE 1
#define SQLTABLE_ACTION_DROP 2
stock SQLTable(connection, sqltype, action, tablename[], string[]) {
new Query[2000];
if(action == SQLTABLE_ACTION_CREATE) {
if(sqltype == SQLTYPE_MYSQL) {
mysql_format(connection, Query, sizeof(Query), "CREATE TABLE IF NOT EXISTS `%s`(%s)", tablename, string);
if(strfind(string, "AUTOINCREMENT", false)) strins(string, "_", strfind(string, "AUTO", false), -1);
mysql_tquery(connection, Query, "", "");
} else if(sqltype == SQLTYPE_SQLITE) {
format(Query, sizeof(Query), "CREATE TABLE IF NOT EXISTS `%s`(%s)", tablename, string);
if(strfind(string, "AUTO_INCREMENT", false)) strdel(string, EOF, strfind(string, "AUTO", false) + 1);
db_query(connection, "PRAGMA synchronous = OFF");
db_query(connection, Query);
}
} else if(action == SQLTABLE_ACTION_DROP) {
if(sqltype == SQLTYPE_MYSQL) {
mysql_format(connection, Query, sizeof(Query), "DROP TABLE IF EXISTS `%s` CASCADE", tablename);
mysql_tquery(connection, Query, "", "");
#pragma unused string
} else if(sqltype == SQLTYPE_SQLITE) {
format(Query, sizeof(Query), "DROP TABLE IF EXISTS `%s` CASCADE", tablename);
db_query(connection, Query);
#pragma unused string
}
}
return 1;
}

