diff --git a/plugins/include/core.inc b/plugins/include/core.inc index f1c8d545..00382b10 100644 --- a/plugins/include/core.inc +++ b/plugins/include/core.inc @@ -95,7 +95,19 @@ enum PluginStatus }; /** - * Plugin information properties. + * Plugin information properties. Plugins can declare a global variable with + * their info. Example, + * + * public Plugin:myinfo = { + * name = "Admin Help", + * author = "AlliedModders LLC", + * description = "Display command information", + * version = "1.0", + * url = "http://www.sourcemod.net/" + * }; + * + * SourceMod will display this information when a user inspects plugins in the + * console. */ enum PluginInfo { diff --git a/plugins/include/entity.inc b/plugins/include/entity.inc index a1743de2..c9d92e47 100644 --- a/plugins/include/entity.inc +++ b/plugins/include/entity.inc @@ -682,15 +682,12 @@ native GetEntPropArraySize(entity, PropType:type, const String:prop[]); * @param array Array to read into. * @param arraySize Number of values to read. * @param dataSize Size of each value in bytes (1, 2, or 4). - * @noreturn * @error Invalid entity or offset out of reasonable bounds. */ -stock GetEntDataArray(entity, offset, array[], arraySize, dataSize=4) +stock void GetEntDataArray(int entity, int offset, int[] array, int arraySize, int dataSize=4) { - for (new i=0; i= maxClients) - { break; - } } } diff --git a/plugins/include/sourcemod.inc b/plugins/include/sourcemod.inc index c762983d..bb928258 100644 --- a/plugins/include/sourcemod.inc +++ b/plugins/include/sourcemod.inc @@ -83,18 +83,6 @@ enum APLRes APLRes_SilentFailure /**< Plugin shouldn't load but do so silently */ }; -/** - * Declare this as a struct in your plugin to expose its information. - * Example: - * - * public Plugin:myinfo = - * { - * name = "My Plugin", - * //etc - * }; - */ -public Plugin:myinfo; - /** * Called when the plugin is fully initialized and all known external references * are resolved. This is only called once in the lifetime of the plugin, and is diff --git a/plugins/include/string.inc b/plugins/include/string.inc index fed99059..c5800213 100644 --- a/plugins/include/string.inc +++ b/plugins/include/string.inc @@ -433,30 +433,19 @@ stock CharToLower(chr) * @return The index of the first occurrence of the character * in the string, or -1 if the character was not found. */ -stock FindCharInString(const String:str[], c, bool:reverse = false) +stock int FindCharInString(const char[] str, char c, bool reverse = false) { - new i, len - - len = strlen(str); + int len = strlen(str); - if (!reverse) - { - for (i = 0; i < len; i++) - { + if (!reverse) { + for (int i = 0; i < len; i++) { if (str[i] == c) - { return i; - } } - } - else - { - for (i = len - 1; i >= 0; i--) - { + } else { + for (int i = len - 1; i >= 0; i--) { if (str[i] == c) - { return i; - } } }