How do I pass the value of a variable from one event to another? Here's an example of what I mean, not written in true LSL:
CODE
integer notecardline = 0;
default()
{
dataserver()
{
[get notecard data and save it to notecardline];
}
touch_start()
{
[do something with notecardline];
}
}
Very crude and I'm not sure if that demonstrates what I mean, but basically, when I define a variable at the start, then use it in one event, such as dataserver it will do something within that event but when I need to use it in touch_start or listen for example, the variable is empty again... how do I get it to remember and allow me to interact with it.
What I would like to do is to get dataserver to firstly tell me how many lines there are in a notecard, then using listen I'm interacting with a GUI, I need it to use the number of notecard lines to work properly. The GUI will choose which line I want and then I need to get that line out of the notecard again, presumably with dataserver.
The actual way to do this isn't in question here, I'm trying to solve that in another thread, all I need to know here is how on earth I get the variable from one event to another without it resetting to 0
