I want to set a variable with a number like :
in comming text 1 =a1
in comming text 2 =a2
in comming text 3 =a3
and so on
this is my script code but it doesn't work:
text(a) = {sms_text};
I would be happy if someone could help me

Moderator: Martin
Code: Select all
//create an empty list
myList = newList();
//add three elements to the list
addElement(myList, "text 1");
addElement(myList, "text 2");
addElement(myList, "text 3");
//get the length of the list and store in variable n
n = length(myList);
//access the elements in the list
first_text = getElement(myList, 0);
second_text = getElement(myList, 1);
third_text = getElement(myList, 2);
Code: Select all
addElement(list, 0, sms_text); //add sms_text at the first position of the list
addElement(list, 1, sms_text); //add sms_text at the second position of the list
Code: Select all
if (global_sms_list == null)
{
global_sms_list = newList();
}
addElement(global_sms_list, sms_text);//append sms to the end of the list
//or alternatively store in reverse order
//addElement(global_sms_list, 0, sms_text);//insert sms as the first elment
b=0; //to start looping at index 0 (first element)