Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006723opensim[REGION] Script Functionspublic2013-08-01 09:222013-08-05 03:58
Assigned To 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0006723: Cannot convert type [...]vector 3 to bool
DescriptionWhen I compile a sitter script I get the following error:
Error CS0029: Cannot implicitly convert type 'OpenSim.Region.ScriptEngine.Shared.LSL_Type.Vector3' to 'bool' for several times.
I attach the script.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
Script Engine
Environment.NET / Windows64
Mono VersionNone
Attached Filestxt file icon Sitter.txt [^] (29,641 bytes) 2013-08-01 09:22 [Show Content]
txt file icon Sitter_fixed_again.txt [^] (29,633 bytes) 2013-08-05 03:58 [Show Content]

- Relationships

-  Notes
Mata Hari (reporter)
2013-08-03 10:00
edited on: 2013-08-03 10:08

I am attaching a revised version of the script which will compile correctly for you (or at least it does for me in Firestorm 4.2).

A couple notes:

1. The "fix" appears to be a work-around for a bug but I'm not certain if it's a viewer bug or an Opensim seems that a boolean test on a vector variable is failing to compile whereas according to LSL wiki it should evaluate to false if the value is ZERO_VECTOR and true for anything else. To make your scripts work I changed all logical tests involving vectors from if(vector) to if (vector!=NULL_VECTOR) and it compiled perfectly.

2. IMPORTANT: currently the llSetLinkPrimitiveParams() function is broken (and so is llSetLinkPrimitiveParamsFast() and the corresponding OSSL functions). An avatar is not moved by any of these functions -- see 0006121 -- so that means your script won't do what you want it to, even though it is written correctly.

3. I also changed a couple lines where you were type-casting a list call instead of using the more appropriate call. You had vector = (vector)llList2String(list,i) which I changed to vector=llList2Vector(list,i) and in the same part of the script you had rotation=(rotation)llList2String(list,i) which I changed to rotation=llList2Rot(list,i). Your approach will work but it's "messy" and slightly harder to read :P

bibuccia (reporter)
2013-08-04 13:25

Hi Mata, thank you. I have tried it with several viewers (Firestorm 4.2 too and up) but it doesn't compile, i get the same error
Mata Hari (reporter)
2013-08-05 03:58

Oh gosh, I'm sorry, I must have accidentally attached the wrong version of the fixed file. Try the new one I've added.

- Issue History
Date Modified Username Field Change
2013-08-01 09:22 bibuccia New Issue
2013-08-01 09:22 bibuccia File Added: Sitter.txt
2013-08-03 10:00 Mata Hari Note Added: 0024243
2013-08-03 10:00 Mata Hari File Added: Sitter_fixed.txt
2013-08-03 10:08 Mata Hari Note Edited: 0024243 View Revisions
2013-08-04 13:25 bibuccia Note Added: 0024244
2013-08-05 03:58 Mata Hari Note Added: 0024247
2013-08-05 03:58 Mata Hari File Added: Sitter_fixed_again.txt
2013-08-05 05:49 Mata Hari File Deleted: Sitter_fixed.txt

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker