{"action":"created","issue":{"url":"https://api.github.com/repos/Y-Less/YSI-Includes/issues/36","labels_url":"https://api.github.com/repos/Y-Less/YSI-Includes/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/Y-Less/YSI-Includes/issues/36/comments","events_url":"https://api.github.com/repos/Y-Less/YSI-Includes/issues/36/events","html_url":"https://github.com/Y-Less/YSI-Includes/issues/36","id":57162873,"number":36,"title":"y_master unloading incorrectly","user":{"login":"samphunter","id":3685636,"avatar_url":"https://avatars.githubusercontent.com/u/3685636?v=3","gravatar_id":"","url":"https://api.github.com/users/samphunter","html_url":"https://github.com/samphunter","followers_url":"https://api.github.com/users/samphunter/followers","following_url":"https://api.github.com/users/samphunter/following{/other_user}","gists_url":"https://api.github.com/users/samphunter/gists{/gist_id}","starred_url":"https://api.github.com/users/samphunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samphunter/subscriptions","organizations_url":"https://api.github.com/users/samphunter/orgs","repos_url":"https://api.github.com/users/samphunter/repos","events_url":"https://api.github.com/users/samphunter/events{/privacy}","received_events_url":"https://api.github.com/users/samphunter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-10T11:31:26Z","updated_at":"2015-02-11T00:40:29Z","closed_at":null,"body":"Code (YSI_Coding\\y_master\\once.inc:340):\r\n\r\npublic OnScriptExit()\r\n{\r\n\tP:1(\"MasterOnce_OnScriptExit called\");\r\n\t// Loop through everything this script is master for and call the remote\r\n\t// function for it.  EXCEPT for this script itself!\r\n\tnew\r\n\t\tfunc[4];\r\n\r\n\tfor (new i = 0; i != YSI_g_sMasterCount; ++i)\r\n\t{\r\n\t    printf(\"i = %d, YSI_g_sMasterCount = %d\", i, YSI_g_sMasterCount);\r\n\t\t// This is slightly slower for ending and starting scripts, but uses far\r\n\t\t// less heap space, and these values are rarely used, so may as well\r\n\t\t// pack them (which is what has happened here).\r\n\t\tfunc[0] = YSI_g_sMasterData[i] & 0xFF;\r\n\t\tfunc[1] = (YSI_g_sMasterData[i] >> 8) & 0xFF;\r\n\t\tfunc[2] = YSI_g_sMasterData[i] >> 16;\r\n  \t\tprintf(\"CallLocalFunction(%s,)\", func);\r\n\t\tif(!isnull(func)) CallLocalFunction(func, \"\");\r\n\t\t// The properties currently clear instantly, but that may not always be\r\n\t\t// the case.\r\n\t}\r\n\tsetproperty(8, YSIM_MASTER, getproperty(8, YSIM_MASTER) & ~(1 << _@));\r\n\tMaster_OnScriptExit();\r\n\tCallRemoteFunction(\"Master_OnScriptClose\", \"i\", _@);\r\n\treturn 1;\r\n}\r\n\r\nOutput:\r\n\r\n[12:26:58] i = 0, YSI_g_sMasterCount = 5\r\n[12:26:58] CallLocalFunction(@_,)\r\n[12:26:58] i = 1, YSI_g_sMasterCount = 4\r\n[12:26:58] CallLocalFunction(@a,)\r\n[12:26:58] i = 2, YSI_g_sMasterCount = 3\r\n[12:26:58] CallLocalFunction(@7,)\r\n[12:26:58] i = 3, YSI_g_sMasterCount = 2\r\n[12:26:58] CallLocalFunction(@2,)\r\n[12:26:58] i = 4, YSI_g_sMasterCount = 1\r\n[12:26:58] CallLocalFunction(@@,)\r\n[12:26:58] i = 5, YSI_g_sMasterCount = 0\r\n[12:26:58] CallLocalFunction(,)\r\n[12:26:58] i = 6, YSI_g_sMasterCount = 0\r\n[12:26:58] CallLocalFunction(,)\r\n[12:26:58] i = 7, YSI_g_sMasterCount = 0\r\n[12:26:58] CallLocalFunction(,)\r\n[12:26:58] i = 8, YSI_g_sMasterCount = 0\r\n...\r\n[12:26:58] i = 64, YSI_g_sMasterCount = 0\r\n[12:26:58] [debug] Run time error 4: \"Array index out of bounds\"\r\n[12:26:58] [debug] AMX backtrace:\r\n[12:26:58] [debug] #0 00032bac in public ScriptInit_OnScriptExit ()  at ...pawno\\include\\YSI_Visual\\..\\YSI_Core\\y_master/once.inc:354\r\n[12:26:58] [debug] #1 00002898 in public OnFilterScriptExit () at ...\\pawno\\include\\YSI_Data\\..\\YSI_Internal\\..\\YSI_Server\\y_scriptinit.inc:207"},"comment":{"url":"https://api.github.com/repos/Y-Less/YSI-Includes/issues/comments/73815321","html_url":"https://github.com/Y-Less/YSI-Includes/issues/36#issuecomment-73815321","issue_url":"https://api.github.com/repos/Y-Less/YSI-Includes/issues/36","id":73815321,"user":{"login":"Y-Less","id":991078,"avatar_url":"https://avatars.githubusercontent.com/u/991078?v=3","gravatar_id":"","url":"https://api.github.com/users/Y-Less","html_url":"https://github.com/Y-Less","followers_url":"https://api.github.com/users/Y-Less/followers","following_url":"https://api.github.com/users/Y-Less/following{/other_user}","gists_url":"https://api.github.com/users/Y-Less/gists{/gist_id}","starred_url":"https://api.github.com/users/Y-Less/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Y-Less/subscriptions","organizations_url":"https://api.github.com/users/Y-Less/orgs","repos_url":"https://api.github.com/users/Y-Less/repos","events_url":"https://api.github.com/users/Y-Less/events{/privacy}","received_events_url":"https://api.github.com/users/Y-Less/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T00:40:29Z","updated_at":"2015-02-11T00:40:29Z","body":"I think it is reducing that variable, yes."}}