mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
mssql_error fix
This commit is contained in:
parent
8afd62a7c9
commit
9df4374195
@ -146,7 +146,7 @@ static cell AMX_NATIVE_CALL mssql_close(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
unsigned int id = params[1] - 1;
|
unsigned int id = params[1] - 1;
|
||||||
|
|
||||||
if (id >= DBList.size() || id < 0 || DBList.at(id)->free) {
|
if (id >= DBList.size() || DBList.at(id)->free) {
|
||||||
error.assign("Invalid handle.");
|
error.assign("Invalid handle.");
|
||||||
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
return 0;
|
return 0;
|
||||||
@ -159,7 +159,7 @@ static cell AMX_NATIVE_CALL mssql_query(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
unsigned int id = params[1] - 1;
|
unsigned int id = params[1] - 1;
|
||||||
|
|
||||||
if (id >= DBList.size() || id < 0 || DBList.at(id)->free) {
|
if (id >= DBList.size() || DBList.at(id)->free) {
|
||||||
error.assign("Invalid handle.");
|
error.assign("Invalid handle.");
|
||||||
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
return 0;
|
return 0;
|
||||||
@ -209,7 +209,7 @@ static cell AMX_NATIVE_CALL mssql_nextrow(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
unsigned int id = params[1] - 1;
|
unsigned int id = params[1] - 1;
|
||||||
|
|
||||||
if (id >= DBList.size() || id < 0 || DBList.at(id)->free) {
|
if (id >= DBList.size() || DBList.at(id)->free) {
|
||||||
error.assign("Invalid handle.");
|
error.assign("Invalid handle.");
|
||||||
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
return 0;
|
return 0;
|
||||||
@ -242,7 +242,7 @@ static cell AMX_NATIVE_CALL mssql_getfield(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
unsigned int id = params[1] - 1;
|
unsigned int id = params[1] - 1;
|
||||||
|
|
||||||
if (id >= DBList.size() || id < 0 || DBList.at(id)->free) {
|
if (id >= DBList.size() || DBList.at(id)->free) {
|
||||||
error.assign("Invalid handle.");
|
error.assign("Invalid handle.");
|
||||||
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
|
||||||
return 0;
|
return 0;
|
||||||
@ -292,7 +292,6 @@ static cell AMX_NATIVE_CALL mssql_getfield(AMX *amx, cell *params)
|
|||||||
|
|
||||||
static cell AMX_NATIVE_CALL mssql_error(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL mssql_error(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
error.assign("Invalid handle.");
|
|
||||||
MF_SetAmxString(amx, params[2], error.c_str(), params[3]);
|
MF_SetAmxString(amx, params[2], error.c_str(), params[3]);
|
||||||
return lastError;
|
return lastError;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user