include library.utils; trigger OnHearSpeech(obj_id speaker, string text) { if ( text == "test" ) { dictionary dict = new dictionary(); if (!hasObjVar(self, "myTest")) { messageTo(self, "TestCallback", dict, 1, true); setObjVar(self, "myTest", 1); } } if (text == "end") { removeObjVar(self, "myTest"); } return SCRIPT_CONTINUE; } messageHandler TestCallback() { if (hasObjVar(self, "myTest")) { debugSpeakMsg(self, "bleh"); /*resizeable int[] test = new int[5000]; test[0] = 5; test = new int[0];*/ resizeable int[] test = new int[0]; for (int j = 0; j < 2000; ++j) { test = utils.addElement(test, j); } messageTo(self, "TestCallback", params, 1, true); } return SCRIPT_CONTINUE; }