Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Inventor
Original Poster
#1 Old 20th Feb 2022 at 4:36 AM
Default Bhav, Passing Temp 0 from MakeAction
In one of my scripts I have a guardian TEST script with a loop to create multiple menu options with MakeAction. I set Stack Object ID and Temp 0 to pass two parameters to the main function with 2 args declared. But it does not work as it usually does. Param 1 always contains the first value ever assigned to Temp 0. It doesn't change through the loop, all the menu choices have the same param 1. I tried changing multiple properties of the Bhav, tried making the action with temp 0 or literally. No luck. In the end I gave up and packed the data into Stack Object ID, which means I can't use text substitutions $Family that treat it like a neighbor ID anymore.

What is going on? I suspect there is a flag or a format version for making 2 params.

I realize most of you are artists and not a programmers, but I don't have membership of other forums better suited for this topic.
Advertisement
just a girl
#2 Old 20th Feb 2022 at 5:38 PM
May I see the package? It's easier for me to think this way. I don't promise to find an answer, but I can give it a shot.
Inventor
Original Poster
#3 Old 21st Feb 2022 at 5:25 AM
Thank you for the response. Here is an older work in progress where it didn't work.
http://j7n.sytes.net/temp/mts/olderburglar.zip
Interaction - Household Cash TEST
param 1 get set on the outer loop to family number (not needed), but does not change in the inner loop to the money amount.
just a girl
#4 Old 21st Feb 2022 at 9:28 PM Last edited by Lamare : 21st Feb 2022 at 9:40 PM.
Oof! I think, I know what it is. The $Family string sub appears to change Temp 0 inside the Add/change string prim after you assign it. You could try something else instead of $Family. Maybe $FullNameLocal:X? It'll show last name and first name, and hopefully won't mess with temps, but I don't know.

Thank you for a good riddle

--
So, I guess, $Family returns the family number in Temp 0. My testing 'hood only has two families, so I haven't tested it that well, but it makes sense. If you confirm it, we could edit the wiki page to document this feature.
Inventor
Original Poster
#5 Old 22nd Feb 2022 at 5:51 AM
Removal of the $Family keyword makes it work. Nice discovery. It appears that using $Family indeed writes to Temp 0. I knew temps were ephemeral, but this is something new.

https://i.imgur.com/kXd03Ro.jpg

Access to the household name was the only thing I needed the neighbor id for. I'll have to do without it, and leave leave the script as it I have it in the final version, with the money amount as index into a table.

I'm new to the wiki. You do it please.
Back to top