LSL feature request. The described function does not exist. This article is a feature request.
string llGetText();
Returns a string with the content of the Text inserted with llSetText.
<lsl> //Script that count the times touched //Author: David Thurman integer counter; default { touch_end(integer i) { integer data = (integer)llGetText(); counter = data + 1; llSetText((string)counter, <1,0,1>,1); } } </lsl>
<lsl> //Script that count the amount of money donated: //Author: David Thurman string text; default {
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_DEBIT)
state cash;
}
}
state cash {
money(key id, integer amount)
{
text = llGetText(); //this text is preformated as seen in the llSetText below.
integer balance = (integer)llGetSubString(text, 25, -1); //Extract the value of the previus balance from the text.
integer total = balance + amount; //Add the balance with the amount of money donated
llSetText("Total of money donated: L$" + (string)total, <1,0,1>,1); //Update the Text with the new total.
}
} </LSL>
The link for the related Jira is this: Jira for llGetText.