{"action":"created","comment":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/comments/38811845","id":38811845,"diff_hunk":"@@ -0,0 +1,48 @@\n+/* ----------------------------------------------------------------------------\n+Function: CBA_fnc_findTypeName\n+\n+Description:\n+    A function that returns the index of the first entry of the given type in an array.\n+\n+Parameters:\n+    0: Array\n+    1: TypeName, if parameter is a string, that contains a case insensitive typename, it will be used. Otherwise typename of the variable will be used.\n+\n+Example:\n+    (begin example)\n+    _index = [\"OBJECT\",[\"\", Player, \"test\", nil, VARIABLE, nil]] call CBA_fnc_findTypeName\n+    (end)\n+\n+Returns:\n+    Index of the first entry of the indicated type in the array or -1 if no entry of the type could be found.\n+\n+Author:\n+    joko // Jonas\n+---------------------------------------------------------------------------- */\n+#include \"script_component.hpp\"\n+\n+#define TYPENAMES [\"ARRAY\", \"BOOL\", \"CODE\", \"CONFIG\", \"CONTROL\", \"DISPLAY\", \"GROUP\", \"LOCATION\", \"OBJECT\", \"SCALAR\", \"SCRIPT\", \"SIDE\", \"STRING\", \"TASK\", \"TEXT\", \"TEAM_MEMBER\", \"NAMESPACE\"]\n+\n+scopeName \"main\";\n+\n+params [[\"_array\", [], [[]]], \"_typeName\"];\n+\n+if (isNil \"_typeName\" || {_array isEqualTo []}) exitWith {-1};\n+\n+// If a string is given, tansform to uppercase for type matching","path":"addons/arrays/fnc_findTypeName.sqf","position":32,"original_position":32,"commit_id":"aa136b55fce9a0161cc46d695287cb123068833b","original_commit_id":"aa136b55fce9a0161cc46d695287cb123068833b","user":{"login":"ViperMaul","id":345876,"avatar_url":"https://avatars.githubusercontent.com/u/345876?v=3","gravatar_id":"","url":"https://api.github.com/users/ViperMaul","html_url":"https://github.com/ViperMaul","followers_url":"https://api.github.com/users/ViperMaul/followers","following_url":"https://api.github.com/users/ViperMaul/following{/other_user}","gists_url":"https://api.github.com/users/ViperMaul/gists{/gist_id}","starred_url":"https://api.github.com/users/ViperMaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViperMaul/subscriptions","organizations_url":"https://api.github.com/users/ViperMaul/orgs","repos_url":"https://api.github.com/users/ViperMaul/repos","events_url":"https://api.github.com/users/ViperMaul/events{/privacy}","received_events_url":"https://api.github.com/users/ViperMaul/received_events","type":"User","site_admin":false},"body":"A better word for \"transform\" in this context is to use \"convert\"\r\n","created_at":"2015-09-05T15:34:51Z","updated_at":"2015-09-05T15:34:51Z","html_url":"https://github.com/CBATeam/CBA_A3/pull/131#discussion_r38811845","pull_request_url":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/131","_links":{"self":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/comments/38811845"},"html":{"href":"https://github.com/CBATeam/CBA_A3/pull/131#discussion_r38811845"},"pull_request":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/131"}}},"pull_request":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/131","id":43240639,"html_url":"https://github.com/CBATeam/CBA_A3/pull/131","diff_url":"https://github.com/CBATeam/CBA_A3/pull/131.diff","patch_url":"https://github.com/CBATeam/CBA_A3/pull/131.patch","issue_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/131","number":131,"state":"open","locked":false,"title":"Add 4 New Array Functions","user":{"login":"jokoho48","id":7695985,"avatar_url":"https://avatars.githubusercontent.com/u/7695985?v=3","gravatar_id":"","url":"https://api.github.com/users/jokoho48","html_url":"https://github.com/jokoho48","followers_url":"https://api.github.com/users/jokoho48/followers","following_url":"https://api.github.com/users/jokoho48/following{/other_user}","gists_url":"https://api.github.com/users/jokoho48/gists{/gist_id}","starred_url":"https://api.github.com/users/jokoho48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jokoho48/subscriptions","organizations_url":"https://api.github.com/users/jokoho48/orgs","repos_url":"https://api.github.com/users/jokoho48/repos","events_url":"https://api.github.com/users/jokoho48/events{/privacy}","received_events_url":"https://api.github.com/users/jokoho48/received_events","type":"User","site_admin":false},"body":"Add 4 New Array Functions to Find First Entry of TypeOf, TypeName, Null or Nil in Array","created_at":"2015-08-25T01:24:04Z","updated_at":"2015-09-05T15:34:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c440808ad17db520db8e99554b0582ea2d7f732d","assignee":null,"milestone":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/milestones/6","html_url":"https://github.com/CBATeam/CBA_A3/milestones/2.1","labels_url":"https://api.github.com/repos/CBATeam/CBA_A3/milestones/6/labels","id":1245636,"number":6,"title":"2.1","description":"Bug fixes and support for A3 v1.50","creator":{"login":"ViperMaul","id":345876,"avatar_url":"https://avatars.githubusercontent.com/u/345876?v=3","gravatar_id":"","url":"https://api.github.com/users/ViperMaul","html_url":"https://github.com/ViperMaul","followers_url":"https://api.github.com/users/ViperMaul/followers","following_url":"https://api.github.com/users/ViperMaul/following{/other_user}","gists_url":"https://api.github.com/users/ViperMaul/gists{/gist_id}","starred_url":"https://api.github.com/users/ViperMaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViperMaul/subscriptions","organizations_url":"https://api.github.com/users/ViperMaul/orgs","repos_url":"https://api.github.com/users/ViperMaul/repos","events_url":"https://api.github.com/users/ViperMaul/events{/privacy}","received_events_url":"https://api.github.com/users/ViperMaul/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":15,"state":"open","created_at":"2015-08-07T15:14:58Z","updated_at":"2015-09-04T19:22:13Z","due_on":"2015-08-31T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/131/commits","review_comments_url":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/131/comments","review_comment_url":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/131/comments","statuses_url":"https://api.github.com/repos/CBATeam/CBA_A3/statuses/aa136b55fce9a0161cc46d695287cb123068833b","head":{"label":"jokoho48:NewArrayFunctions","ref":"NewArrayFunctions","sha":"aa136b55fce9a0161cc46d695287cb123068833b","user":{"login":"jokoho48","id":7695985,"avatar_url":"https://avatars.githubusercontent.com/u/7695985?v=3","gravatar_id":"","url":"https://api.github.com/users/jokoho48","html_url":"https://github.com/jokoho48","followers_url":"https://api.github.com/users/jokoho48/followers","following_url":"https://api.github.com/users/jokoho48/following{/other_user}","gists_url":"https://api.github.com/users/jokoho48/gists{/gist_id}","starred_url":"https://api.github.com/users/jokoho48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jokoho48/subscriptions","organizations_url":"https://api.github.com/users/jokoho48/orgs","repos_url":"https://api.github.com/users/jokoho48/repos","events_url":"https://api.github.com/users/jokoho48/events{/privacy}","received_events_url":"https://api.github.com/users/jokoho48/received_events","type":"User","site_admin":false},"repo":{"id":39950346,"name":"CBA_A3","full_name":"jokoho48/CBA_A3","owner":{"login":"jokoho48","id":7695985,"avatar_url":"https://avatars.githubusercontent.com/u/7695985?v=3","gravatar_id":"","url":"https://api.github.com/users/jokoho48","html_url":"https://github.com/jokoho48","followers_url":"https://api.github.com/users/jokoho48/followers","following_url":"https://api.github.com/users/jokoho48/following{/other_user}","gists_url":"https://api.github.com/users/jokoho48/gists{/gist_id}","starred_url":"https://api.github.com/users/jokoho48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jokoho48/subscriptions","organizations_url":"https://api.github.com/users/jokoho48/orgs","repos_url":"https://api.github.com/users/jokoho48/repos","events_url":"https://api.github.com/users/jokoho48/events{/privacy}","received_events_url":"https://api.github.com/users/jokoho48/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jokoho48/CBA_A3","description":"Community Base Addons for Arma 3","fork":true,"url":"https://api.github.com/repos/jokoho48/CBA_A3","forks_url":"https://api.github.com/repos/jokoho48/CBA_A3/forks","keys_url":"https://api.github.com/repos/jokoho48/CBA_A3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jokoho48/CBA_A3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jokoho48/CBA_A3/teams","hooks_url":"https://api.github.com/repos/jokoho48/CBA_A3/hooks","issue_events_url":"https://api.github.com/repos/jokoho48/CBA_A3/issues/events{/number}","events_url":"https://api.github.com/repos/jokoho48/CBA_A3/events","assignees_url":"https://api.github.com/repos/jokoho48/CBA_A3/assignees{/user}","branches_url":"https://api.github.com/repos/jokoho48/CBA_A3/branches{/branch}","tags_url":"https://api.github.com/repos/jokoho48/CBA_A3/tags","blobs_url":"https://api.github.com/repos/jokoho48/CBA_A3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jokoho48/CBA_A3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jokoho48/CBA_A3/git/refs{/sha}","trees_url":"https://api.github.com/repos/jokoho48/CBA_A3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jokoho48/CBA_A3/statuses/{sha}","languages_url":"https://api.github.com/repos/jokoho48/CBA_A3/languages","stargazers_url":"https://api.github.com/repos/jokoho48/CBA_A3/stargazers","contributors_url":"https://api.github.com/repos/jokoho48/CBA_A3/contributors","subscribers_url":"https://api.github.com/repos/jokoho48/CBA_A3/subscribers","subscription_url":"https://api.github.com/repos/jokoho48/CBA_A3/subscription","commits_url":"https://api.github.com/repos/jokoho48/CBA_A3/commits{/sha}","git_commits_url":"https://api.github.com/repos/jokoho48/CBA_A3/git/commits{/sha}","comments_url":"https://api.github.com/repos/jokoho48/CBA_A3/comments{/number}","issue_comment_url":"https://api.github.com/repos/jokoho48/CBA_A3/issues/comments{/number}","contents_url":"https://api.github.com/repos/jokoho48/CBA_A3/contents/{+path}","compare_url":"https://api.github.com/repos/jokoho48/CBA_A3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jokoho48/CBA_A3/merges","archive_url":"https://api.github.com/repos/jokoho48/CBA_A3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jokoho48/CBA_A3/downloads","issues_url":"https://api.github.com/repos/jokoho48/CBA_A3/issues{/number}","pulls_url":"https://api.github.com/repos/jokoho48/CBA_A3/pulls{/number}","milestones_url":"https://api.github.com/repos/jokoho48/CBA_A3/milestones{/number}","notifications_url":"https://api.github.com/repos/jokoho48/CBA_A3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jokoho48/CBA_A3/labels{/name}","releases_url":"https://api.github.com/repos/jokoho48/CBA_A3/releases{/id}","created_at":"2015-07-30T12:51:59Z","updated_at":"2015-07-30T12:52:03Z","pushed_at":"2015-09-05T09:35:41Z","git_url":"git://github.com/jokoho48/CBA_A3.git","ssh_url":"git@github.com:jokoho48/CBA_A3.git","clone_url":"https://github.com/jokoho48/CBA_A3.git","svn_url":"https://github.com/jokoho48/CBA_A3","homepage":"","size":8454,"stargazers_count":1,"watchers_count":1,"language":"SQF","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"CBATeam:master","ref":"master","sha":"6add933dc757b8509fb9ded11c747656a5f2b3ab","user":{"login":"CBATeam","id":12647545,"avatar_url":"https://avatars.githubusercontent.com/u/12647545?v=3","gravatar_id":"","url":"https://api.github.com/users/CBATeam","html_url":"https://github.com/CBATeam","followers_url":"https://api.github.com/users/CBATeam/followers","following_url":"https://api.github.com/users/CBATeam/following{/other_user}","gists_url":"https://api.github.com/users/CBATeam/gists{/gist_id}","starred_url":"https://api.github.com/users/CBATeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CBATeam/subscriptions","organizations_url":"https://api.github.com/users/CBATeam/orgs","repos_url":"https://api.github.com/users/CBATeam/repos","events_url":"https://api.github.com/users/CBATeam/events{/privacy}","received_events_url":"https://api.github.com/users/CBATeam/received_events","type":"Organization","site_admin":false},"repo":{"id":36454957,"name":"CBA_A3","full_name":"CBATeam/CBA_A3","owner":{"login":"CBATeam","id":12647545,"avatar_url":"https://avatars.githubusercontent.com/u/12647545?v=3","gravatar_id":"","url":"https://api.github.com/users/CBATeam","html_url":"https://github.com/CBATeam","followers_url":"https://api.github.com/users/CBATeam/followers","following_url":"https://api.github.com/users/CBATeam/following{/other_user}","gists_url":"https://api.github.com/users/CBATeam/gists{/gist_id}","starred_url":"https://api.github.com/users/CBATeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CBATeam/subscriptions","organizations_url":"https://api.github.com/users/CBATeam/orgs","repos_url":"https://api.github.com/users/CBATeam/repos","events_url":"https://api.github.com/users/CBATeam/events{/privacy}","received_events_url":"https://api.github.com/users/CBATeam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CBATeam/CBA_A3","description":"Community Base Addons for Arma 3","fork":false,"url":"https://api.github.com/repos/CBATeam/CBA_A3","forks_url":"https://api.github.com/repos/CBATeam/CBA_A3/forks","keys_url":"https://api.github.com/repos/CBATeam/CBA_A3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CBATeam/CBA_A3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CBATeam/CBA_A3/teams","hooks_url":"https://api.github.com/repos/CBATeam/CBA_A3/hooks","issue_events_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/events{/number}","events_url":"https://api.github.com/repos/CBATeam/CBA_A3/events","assignees_url":"https://api.github.com/repos/CBATeam/CBA_A3/assignees{/user}","branches_url":"https://api.github.com/repos/CBATeam/CBA_A3/branches{/branch}","tags_url":"https://api.github.com/repos/CBATeam/CBA_A3/tags","blobs_url":"https://api.github.com/repos/CBATeam/CBA_A3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CBATeam/CBA_A3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CBATeam/CBA_A3/git/refs{/sha}","trees_url":"https://api.github.com/repos/CBATeam/CBA_A3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CBATeam/CBA_A3/statuses/{sha}","languages_url":"https://api.github.com/repos/CBATeam/CBA_A3/languages","stargazers_url":"https://api.github.com/repos/CBATeam/CBA_A3/stargazers","contributors_url":"https://api.github.com/repos/CBATeam/CBA_A3/contributors","subscribers_url":"https://api.github.com/repos/CBATeam/CBA_A3/subscribers","subscription_url":"https://api.github.com/repos/CBATeam/CBA_A3/subscription","commits_url":"https://api.github.com/repos/CBATeam/CBA_A3/commits{/sha}","git_commits_url":"https://api.github.com/repos/CBATeam/CBA_A3/git/commits{/sha}","comments_url":"https://api.github.com/repos/CBATeam/CBA_A3/comments{/number}","issue_comment_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/comments{/number}","contents_url":"https://api.github.com/repos/CBATeam/CBA_A3/contents/{+path}","compare_url":"https://api.github.com/repos/CBATeam/CBA_A3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CBATeam/CBA_A3/merges","archive_url":"https://api.github.com/repos/CBATeam/CBA_A3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CBATeam/CBA_A3/downloads","issues_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues{/number}","pulls_url":"https://api.github.com/repos/CBATeam/CBA_A3/pulls{/number}","milestones_url":"https://api.github.com/repos/CBATeam/CBA_A3/milestones{/number}","notifications_url":"https://api.github.com/repos/CBATeam/CBA_A3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CBATeam/CBA_A3/labels{/name}","releases_url":"https://api.github.com/repos/CBATeam/CBA_A3/releases{/id}","created_at":"2015-05-28T17:34:05Z","updated_at":"2015-09-04T19:01:58Z","pushed_at":"2015-09-04T19:25:38Z","git_url":"git://github.com/CBATeam/CBA_A3.git","ssh_url":"git@github.com:CBATeam/CBA_A3.git","clone_url":"https://github.com/CBATeam/CBA_A3.git","svn_url":"https://github.com/CBATeam/CBA_A3","homepage":"","size":9526,"stargazers_count":32,"watchers_count":32,"language":"SQF","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":21,"forks":14,"open_issues":21,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/131"},"html":{"href":"https://github.com/CBATeam/CBA_A3/pull/131"},"issue":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/issues/131"},"comments":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/issues/131/comments"},"review_comments":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/131/comments"},"review_comment":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/pulls/131/commits"},"statuses":{"href":"https://api.github.com/repos/CBATeam/CBA_A3/statuses/aa136b55fce9a0161cc46d695287cb123068833b"}}}}