Changed ArrayGetCell() to return the cell value instead of byreferencing the value.
This commit is contained in:
parent
9ce9b142e7
commit
83c82387e3
|
@ -136,13 +136,14 @@ static cell AMX_NATIVE_CALL ArrayGetCell(AMX* amx, cell* params)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vec->GetCell(params[2],get_amxaddr(amx, params[3]))!=1)
|
cell ret;
|
||||||
|
if (vec->GetCell(params[2],&ret)!=1)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Invalid cellvector handle provided (%d:%d:%d)", params[1], params[2], vec->Size());
|
LogError(amx, AMX_ERR_NATIVE, "Invalid cellvector handle provided (%d:%d:%d)", params[1], params[2], vec->Size());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return ret;
|
||||||
}
|
}
|
||||||
// ArrayGetString(Array:which, item, any:output[], size);
|
// ArrayGetString(Array:which, item, any:output[], size);
|
||||||
static cell AMX_NATIVE_CALL ArrayGetString(AMX* amx, cell* params)
|
static cell AMX_NATIVE_CALL ArrayGetString(AMX* amx, cell* params)
|
||||||
|
|
|
@ -55,9 +55,9 @@ native ArrayGetArray(Array:which, item, any:output[]);
|
||||||
*
|
*
|
||||||
* @param which The array to retrieve the item from.
|
* @param which The array to retrieve the item from.
|
||||||
* @param item The item to retrieve (zero-based).
|
* @param item The item to retrieve (zero-based).
|
||||||
* @param output The variable to store the value in.
|
* @return The value of the cell.
|
||||||
*/
|
*/
|
||||||
native ArrayGetCell(Array:which, item, &any:output);
|
native any:ArrayGetCell(Array:which, item);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a string value from an array.
|
* Returns a string value from an array.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user