• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-2603
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Scouse Linden
Reporter: phil deakins
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

Script compiles ok in the main grid, but not in the Mono beta grid, either with LSL or Mono

Created: 03/Jul/08 05:13 PM   Updated: 29/Jul/08 12:51 PM
Component/s: Scripts
Affects Version/s: Mono Beta
Fix Version/s: None

File Attachments: 1. Text File menu.txt (14 kB)

Environment: n/a
Issue Links:
Relates
 

Linden Lab Internal Branch: mono-based-on-release-90252


 Description  « Hide
The ~menu script that is very common in MLP furniture throughout the grid compiles ok on the main grid, but not on the Beta grid. I've tried it in mono sims and in ordinary sims on the Beta grid, but it won't compile in either type of sim. It gives a normal type of script error when compiling ("... not in scope") in both types is sim on the Beta grid, but compiling gives no error on the main grid.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Strife Onizuka added a comment - 03/Jul/08 11:50 PM
Could you post the script here?

phil deakins added a comment - 04/Jul/08 12:18 AM
It's a big script. I can let you have it in SL though.

Scouse Linden added a comment - 04/Jul/08 09:39 AM
Sounds like one of the cases of undefined behaviour in LSL that we had to fix.
Please paste the smallest part of the script which can demonstrate your problem.

Strife Onizuka added a comment - 05/Jul/08 02:09 AM - edited
Here is the script I was sent, I am confident this is just another example of VWR-811.

phil deakins added a comment - 05/Jul/08 07:40 AM - edited
It isn't that, Strife.

integer chat = 1;

default {
link_message(integer from, integer num, string str, key id) {
}
}

state on
{
listen(integer channel, string name, key user0, string button)

{ if (chat) llSay(0,"hello world"); }

}

I have a test object in a non-mono sim in the beta grid, with that code in it. It produces the error, saying about the variable 'chat' (line 11), "Name not defined within scope".

As far as I know, when a variable is declared as global, as 'chat' is, it is available everywhere - in all states. If I'm mistaken about that, then it's the main grid that's wrong, because the whole script compiles ok there.


Scouse Linden added a comment - 06/Jul/08 05:09 AM - edited
Ah excellent - thats just what I need to fix this problem.

It's probably caused by the fix to http://jira.secondlife.com/browse/SVC-1372

For some unknown legacy reasons 'listen' is actually compiled to 'chat'


phil deakins added a comment - 06/Jul/08 10:04 AM - edited
That's looks like the answer, Scouse. I tried it with the varbiable's name changed, and it compiled ok. I've no doubt that it will be the same for the whole script, but I have to get back to the Wimbledon final, so I'll check that shortly

Strife Onizuka added a comment - 06/Jul/08 02:29 PM
/me puts foot in mouth _

phil deakins added a comment - 07/Jul/08 03:53 AM - edited
The whole script now compiles fine in LSL on the beta grid. I haven't been able to check it in mono yet because there haven't been any mono sims running since I wanted to test it - sometime yesterday (Sunday).

phil deakins added a comment - 07/Jul/08 02:42 PM - edited
The Mono sims are back up, and I've tested the whole script. With that variable name changed, it compiles ok in both LSL and Mono.

Thank you for the help, Scouse and Strife.


Periapse Linden added a comment - 29/Jul/08 12:51 PM
resident confirmed fix, resolving