mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Update trie_natives.cpp (#1052)
"Invalid map handle provided (%d)" error is very unclear when it appears in complex code.
This commit is contained in:
parent
49a8b959b3
commit
fde732f66d
@ -26,7 +26,7 @@ static cell AMX_NATIVE_CALL TrieClear(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
t->map.clear();
|
||||
@ -40,7 +40,7 @@ static cell AMX_NATIVE_CALL TrieSetCell(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ static cell AMX_NATIVE_CALL TrieSetString(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ static cell AMX_NATIVE_CALL TrieSetArray(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ static cell AMX_NATIVE_CALL TrieGetCell(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ static cell AMX_NATIVE_CALL TrieGetString(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ static cell AMX_NATIVE_CALL TrieGetArray(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ static cell AMX_NATIVE_CALL TrieKeyExists(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ static cell AMX_NATIVE_CALL TrieDeleteKey(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -373,7 +373,7 @@ static cell AMX_NATIVE_CALL TrieGetSize(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -386,7 +386,7 @@ static cell AMX_NATIVE_CALL TrieSnapshotCreate(AMX *amx, cell *params)
|
||||
|
||||
if (!t)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[1]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -506,7 +506,7 @@ static cell AMX_NATIVE_CALL TrieIterCreate(AMX *amx, cell *params)
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid map handle provided (%d)", params[arg_handle]);
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid trie handle provided (%d)", params[arg_handle]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user