Fixed compiler warning (check SM forums for details), fixed compiler crash, seemed to be caused by the string parameter not being defaulted to an empty string, using new String:... had no effect, so I went through and defaulted all String parameters to (not uncluding constant expressions).
This commit is contained in:
parent
0404230fc8
commit
2ec263f2a0
|
@ -93,11 +93,11 @@ ConfigLoad()
|
||||||
* @param file The cvar define of the path to the file.
|
* @param file The cvar define of the path to the file.
|
||||||
* @return True if the file exists, false if not.
|
* @return True if the file exists, false if not.
|
||||||
*/
|
*/
|
||||||
bool:ConfigGetFilePath(CvarsList:cvar, String:path[])
|
bool:ConfigGetFilePath(CvarsList:cvar, String:path[] = "")
|
||||||
{
|
{
|
||||||
// Get cvar's path.
|
// Get cvar's path.
|
||||||
decl String:filepath[PLATFORM_MAX_PATH];
|
decl String:filepath[PLATFORM_MAX_PATH];
|
||||||
GetConVarString(g_hCvarsList[cvar], filepath, sizeof(filepath));
|
GetConVarString(Handle:g_hCvarsList[cvar], filepath, sizeof(filepath));
|
||||||
|
|
||||||
// Build full path in return string.
|
// Build full path in return string.
|
||||||
BuildPath(Path_SM, path, PLATFORM_MAX_PATH, filepath);
|
BuildPath(Path_SM, path, PLATFORM_MAX_PATH, filepath);
|
||||||
|
@ -316,7 +316,7 @@ bool:ConfigSettingToBool(const String:option[])
|
||||||
* @param option Variable to store "yes" or "no" in.
|
* @param option Variable to store "yes" or "no" in.
|
||||||
* @param maxlen Max length of return string, (can't be more than 4)
|
* @param maxlen Max length of return string, (can't be more than 4)
|
||||||
*/
|
*/
|
||||||
ConfigBoolToSetting(bool:bOption, String:option[], maxlen)
|
ConfigBoolToSetting(bool:bOption, String:option[] = "", maxlen)
|
||||||
{
|
{
|
||||||
// If option is true, then copy "yes" to return string.
|
// If option is true, then copy "yes" to return string.
|
||||||
if (bOption)
|
if (bOption)
|
||||||
|
|
|
@ -130,7 +130,7 @@ bool:ClassGetTeamDefault(index, cachetype = ZR_CLASS_CACHE_MODIFIED)
|
||||||
* is used, index will be used as a client index.
|
* is used, index will be used as a client index.
|
||||||
* @return Number of cells written. -1 on error.
|
* @return Number of cells written. -1 on error.
|
||||||
*/
|
*/
|
||||||
ClassGetName(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
ClassGetName(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||||
{
|
{
|
||||||
switch (cachetype)
|
switch (cachetype)
|
||||||
{
|
{
|
||||||
|
@ -165,7 +165,7 @@ ClassGetName(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||||
* is used, index will be used as a client index.
|
* is used, index will be used as a client index.
|
||||||
* @return Number of cells written. -1 on error.
|
* @return Number of cells written. -1 on error.
|
||||||
*/
|
*/
|
||||||
ClassGetDescription(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
ClassGetDescription(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||||
{
|
{
|
||||||
switch (cachetype)
|
switch (cachetype)
|
||||||
{
|
{
|
||||||
|
@ -209,7 +209,7 @@ ClassGetDescription(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_P
|
||||||
* is used, index will be used as a client index.
|
* is used, index will be used as a client index.
|
||||||
* @return Number of cells written. -1 on error.
|
* @return Number of cells written. -1 on error.
|
||||||
*/
|
*/
|
||||||
ClassGetModelPath(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
ClassGetModelPath(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||||
{
|
{
|
||||||
switch (cachetype)
|
switch (cachetype)
|
||||||
{
|
{
|
||||||
|
@ -351,7 +351,7 @@ ClassGetAlphaDamage(index, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||||
* is used, index will be used as a client index.
|
* is used, index will be used as a client index.
|
||||||
* @return Number of cells written. -1 on error.
|
* @return Number of cells written. -1 on error.
|
||||||
*/
|
*/
|
||||||
ClassGetOverlayPath(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
ClassGetOverlayPath(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||||
{
|
{
|
||||||
switch (cachetype)
|
switch (cachetype)
|
||||||
{
|
{
|
||||||
|
|
|
@ -688,7 +688,7 @@ ClassClientSetDefaultIndexes(client = -1)
|
||||||
* index will be used as a client index.
|
* index will be used as a client index.
|
||||||
* @return Number of cells written.
|
* @return Number of cells written.
|
||||||
*/
|
*/
|
||||||
ClassDumpData(index, cachetype, String:buffer[], maxlen)
|
ClassDumpData(index, cachetype, String:buffer[] = "", maxlen)
|
||||||
{
|
{
|
||||||
new cellcount;
|
new cellcount;
|
||||||
decl String:attribute[320];
|
decl String:attribute[320];
|
||||||
|
|
|
@ -827,7 +827,7 @@ RestrictCreateGroupWeaponsArray(&Handle:arrayGroupWeapons, const String:weapongr
|
||||||
* @param maxlen Maximum length of the weapon list, the rest is truncated.
|
* @param maxlen Maximum length of the weapon list, the rest is truncated.
|
||||||
* @param separator Separator character between weapon names.
|
* @param separator Separator character between weapon names.
|
||||||
*/
|
*/
|
||||||
RestrictGetGroupWeapons(const String:groupname[], String:weaponlist[], maxlen, const String:separator[])
|
RestrictGetGroupWeapons(const String:groupname[], String:weaponlist[] = "", maxlen, const String:separator[])
|
||||||
{
|
{
|
||||||
KvRewind(kvWeaponGroups);
|
KvRewind(kvWeaponGroups);
|
||||||
KvJumpToKey(kvWeaponGroups, groupname);
|
KvJumpToKey(kvWeaponGroups, groupname);
|
||||||
|
|
|
@ -218,7 +218,7 @@ bool:WeaponsIsValidWeapon(const String:weapon[])
|
||||||
* @param weapon The weapon name.
|
* @param weapon The weapon name.
|
||||||
* @param display Returns with the display name, is not changed if weapon is invalid.
|
* @param display Returns with the display name, is not changed if weapon is invalid.
|
||||||
*/
|
*/
|
||||||
WeaponGetDisplayName(const String:weapon[], String:display[])
|
WeaponGetDisplayName(const String:weapon[], String:display[] = "")
|
||||||
{
|
{
|
||||||
// Reset keyvalue's traversal stack.
|
// Reset keyvalue's traversal stack.
|
||||||
KvRewind(kvWeapons);
|
KvRewind(kvWeapons);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user