This is really ticking me off. What gives?
Here's a bit of code I wrote. The program creates a trigger action on a player, and when it's done doing what it's doing, the trigger needs to be recycled. Should be simple enough, right?
Here's the code: (Doname is called by Main, which just says, "Did you use the 'name' command? If so..DoName")
: DoName
"^RED^You are setting a name on: ^WHITE^ " trigger @ location name strcat Atell
"^CRIMSON^Desc: ^GRAY^" trigger @ location desc strcat Atell
" " Atell
begin
"^YELLOW^Please enter the desired name. NOTE: This cannot be undone except by a Wizard! Take care!" ATell
read
"^YELLOW^You have chosen the name: ^WHITE^" over strcat Caps Atell
"^YELLOW^Is this correct? ^RED^(y/N)" Atell
read
"y" instring not while
pop
repeat ( s )
trigger @ location swap Setname
trigger @ recycle
"Named." Atell
;
(Note that in the actual program, stuff is spaced out better than it appears here. ;))
Here's the resulting debug:
Debug> #24041 247 ("") (main)
Debug> #24041 249 ("") CALLER
Debug> #24041 249 ("", #21700) NAME
Debug> #24041 249 ("", "name") "name"
Debug> #24041 249 ("", "name", "name") TOLOWER
Debug> #24041 249 ("", "name", "name") SWAP
Debug> #24041 249 ("", "name", "name") TOLOWER
Debug> #24041 249 ("", "name", "name") SWAP
Debug> #24041 249 ("", "name", "name") INSTR
Debug> #24041 249 ("", 1) IF->line251
Debug> #24041 249 ("") EXEC->DoName
Debug> #24041 230 ("") (DoName)
Debug> #24041 231 ("") "^RED^You are setting a name o"_
Debug> #24041 231 ("", "^RED^You are setting a name o"_) V2
Debug> #24041 231 ("", "^RED^You are setting a name o"_, V2) @
Debug> #24041 231 ("", "^RED^You are setting a name o"_, #21700) LOCATION
Debug> #24041 231 ("", "^RED^You are setting a name o"_, #21758) NAME
Debug> #24041 231 ("", "^RED^You are setting a name o"_, "Tempest") STRCAT
Debug> #24041 231 ("", "^RED^You are setting a name o"_) "$lib/wix"
Debug> #24041 231 ("", "^RED^You are setting a name o"_, "$lib/wix") MATCH
Debug> #24041 231 ("", "^RED^You are setting a name o"_, #1931) "Atell"
Debug> #24041 231 ("", "^RED^You are setting a name o"_, #1931, "Atell") CALL
You are setting a name on: Tempest
Debug> #24041 232 ("") "^CRIMSON^Desc: ^GRAY^"
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^") V2
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^", V2) @
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^", #21700) LOCATION
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^", #21758) "_/de"
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^", #21758, "_/de") GETPROPSTR
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^", "You see a Female Wolf pup wit"_) STRCAT
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^You see "_) "$lib/wix"
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^You see "_, "$lib/wix") MATCH
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^You see "_, #1931) "Atell"
Debug> #24041 232 ("", "^CRIMSON^Desc: ^GRAY^You see "_, #1931, "Atell") CALL
Desc: You see a Female Wolf pup with gray fur and brown eyes.
Debug> #24041 233 ("") " "
Debug> #24041 233 ("", " ") "$lib/wix"
Debug> #24041 233 ("", " ", "$lib/wix") MATCH
Debug> #24041 233 ("", " ", #1931) "Atell"
Debug> #24041 233 ("", " ", #1931, "Atell") CALL
Debug> #24041 235 ("") "^YELLOW^Please enter the desi"_
Debug> #24041 235 ("", "^YELLOW^Please enter the desi"_) "$lib/wix"
Debug> #24041 235 ("", "^YELLOW^Please enter the desi"_, "$lib/wix") MATCH
Debug> #24041 235 ("", "^YELLOW^Please enter the desi"_, #1931) "Atell"
Debug> #24041 235 ("", "^YELLOW^Please enter the desi"_, #1931, "Atell") CALL
Please enter the desired name. NOTE: This cannot be undone except by a Wizard! Take care!
Debug> #24041 236 ("") READ
Debug> #24041 237 ("", "Tempest") "^YELLOW^You have chosen the n"_
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_) OVER
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_, "Tempest") STRCAT
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_) "$lib/wix"
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_, "$lib/wix") MATCH
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_, #1931) "Caps"
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_, #1931, "Caps") CALL
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_) "$lib/wix"
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_, "$lib/wix") MATCH
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_, #1931) "Atell"
Debug> #24041 237 ("", "Tempest", "^YELLOW^You have chosen the n"_, #1931, "Atell") CALL
You have chosen the name: Tempest
Debug> #24041 238 ("", "Tempest") "^YELLOW^Is this correct? ^RED"_
Debug> #24041 238 ("", "Tempest", "^YELLOW^Is this correct? ^RED"_) "$lib/wix"
Debug> #24041 238 ("", "Tempest", "^YELLOW^Is this correct? ^RED"_, "$lib/wix") MATCH
Debug> #24041 238 ("", "Tempest", "^YELLOW^Is this correct? ^RED"_, #1931) "Atell"
Debug> #24041 238 ("", "Tempest", "^YELLOW^Is this correct? ^RED"_, #1931, "Atell") CALL
Is this correct? (y/N)
Debug> #24041 239 ("", "Tempest") READ
Debug> #24041 240 ("", "Tempest", "y") "y"
Debug> #24041 240 ("", "Tempest", "y", "y") TOLOWER
Debug> #24041 240 ("", "Tempest", "y", "y") SWAP
Debug> #24041 240 ("", "Tempest", "y", "y") TOLOWER
Debug> #24041 240 ("", "Tempest", "y", "y") SWAP
Debug> #24041 240 ("", "Tempest", "y", "y") INSTR
Debug> #24041 240 ("", "Tempest", 1) NOT
Debug> #24041 240 ("", "Tempest", 0) IF->line243
Debug> #24041 243 ("", "Tempest") V2
Debug> #24041 243 ("", "Tempest", V2) @
Debug> #24041 243 ("", "Tempest", #21700) LOCATION
Debug> #24041 243 ("", "Tempest", #21758) SWAP
Debug> #24041 243 ("", #21758, "Tempest") SETNAME
Debug> #24041 244 ("") V2
Debug> #24041 244 ("", V2) @
Debug> #24041 244 ("", #21700) RECYCLE
Programmer Error. Please tell Wixenstyx what you typed, and the following message.
TestPlayer(#10000) using Program.muf(#24041), command '', line 244; RECYCLE: Cannot recycle active program
Okay.. The item being recycled is clearly the EXIT, not a program. The program is #24041, while the exit/trigger is #21700. Why it's giving me this error, I have no idea.
I have tried:
* Chowning the 'name' command to myself.
* Setting the program L-Ok and leaving the 'name' command owned by the effective player.
* Using "trigger @" in main rather than "caller"
* Changing the value of 'trigger' (V2) to something else and THEN recycling.
* Setting and unsetting SETUID and HARDUID flags, since the object ends up belonging to the player.
* Chowning the action.
* Chowning the object.
* Setting and unsetting the Link_OK flag (mainly for the purpose of creating the trigger in the first place, but still.. it didn't affect this problem.)
None of this produces any different result. Same error every time. Any ideas, anyone?
I would be a whole lot more optimistic about the prospects of anyone being able to help me here if I knew more than one or two people who actually know much about MUF, especially MUF on a GLOW server. ;) Meh.