quick fix

This commit is contained in:
RebeccaNod1 2025-07-20 16:57:23 -05:00 committed by GitHub
parent 1ab15f077b
commit f26c0d2853
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,29 +2,27 @@ key target;
string displayText;
default {
on_rez(integer start_param) {
llOwnerSay("🧪 on_rez triggered with start_param: " + (string)start_param);
llListen(start_param, "", NULL_KEY, "");
llOwnerSay("📡 Listening on channel (on_rez): " + (string)start_param);
}
state_entry() {
llOwnerSay("🧭 StatFloat active");
llSetText("Waiting...", <1,1,1>, 1.0);
llSetText("⏳ Waiting...", <1,1,1>, 1.0);
llSetTimerEvent(1.0);
}
on_rez(integer start_param) {
llListen(start_param, "", NULL_KEY, "");
llOwnerSay("📡 Listening on channel " + (string)start_param);
}
listen(integer channel, string name, key id, string message) {
llOwnerSay("🔉 Heard on channel " + (string)channel + ": " + message);
if (llSubStringIndex(message, "FLOAT:") == 0) {
list parts = llParseString2List(message, ["|"], []);
if (llGetListLength(parts) >= 2) {
target = (key)llGetSubString(llList2String(parts, 0), 6, -1);
displayText = llList2String(parts, 1);
llSetText(displayText, <1,1,1>, 1.0);
llOwnerSay("✅ Received FLOAT for: " + (string)target);
llOwnerSay("✅ StatFloat updated for: " + (string)target);
}
} else if (message == "CLEANUP") {
}
else if (message == "CLEANUP") {
llOwnerSay("🧹 Cleaning up...");
llDie();
}