mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-19 16:47:14 +02:00
Updated the exception system in the main plugin to also include the location in the source files in debug builds.
Moved the functions that extract base types from strings as static functions under the associated type. Revised some of the base shared code. Fixed some of the functions in the String library that did not take into account the null terminator.
This commit is contained in:
@ -119,7 +119,7 @@ bool CVehicle::IsStreamedFor(CPlayer & player) const
|
||||
// Is the specified player even valid?
|
||||
if (!player.IsActive())
|
||||
{
|
||||
SqThrowF("Invalid player argument: null");
|
||||
STHROWF("Invalid player argument: null");
|
||||
}
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
@ -936,7 +936,7 @@ void CVehicle::Embark(CPlayer & player) const
|
||||
// Is the specified player even valid?
|
||||
if (!player.IsActive())
|
||||
{
|
||||
SqThrowF("Invalid player argument: null");
|
||||
STHROWF("Invalid player argument: null");
|
||||
}
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
@ -950,7 +950,7 @@ void CVehicle::Embark(CPlayer & player, Int32 slot, bool allocate, bool warp) co
|
||||
// Is the specified player even valid?
|
||||
if (!player.IsActive())
|
||||
{
|
||||
SqThrowF("Invalid player argument: null");
|
||||
STHROWF("Invalid player argument: null");
|
||||
}
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
@ -1235,7 +1235,7 @@ static const Object & Vehicle_FindByID(Int32 id)
|
||||
// Perform a range check on the specified identifier
|
||||
if (INVALID_ENTITYEX(id, SQMOD_VEHICLE_POOL))
|
||||
{
|
||||
SqThrowF("The specified vehicle identifier is invalid: %d", id);
|
||||
STHROWF("The specified vehicle identifier is invalid: %d", id);
|
||||
}
|
||||
// Obtain the ends of the entity pool
|
||||
Core::Vehicles::const_iterator itr = _Core->GetVehicles().cbegin();
|
||||
@ -1258,7 +1258,7 @@ static const Object & Vehicle_FindByTag(CSStr tag)
|
||||
// Perform a validity check on the specified tag
|
||||
if (!tag || *tag == '\0')
|
||||
{
|
||||
SqThrowF("The specified vehicle tag is invalid: null/empty");
|
||||
STHROWF("The specified vehicle tag is invalid: null/empty");
|
||||
}
|
||||
// Obtain the ends of the entity pool
|
||||
Core::Vehicles::const_iterator itr = _Core->GetVehicles().cbegin();
|
||||
|
Reference in New Issue
Block a user