Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001260opensim[REGION] Scripting Enginepublic2008-05-14 03:262008-05-27 01:19
Reporterrjs 
Assigned To 
PrioritynoneSeverityminorReproducibilityalways
StatusclosedResolutionsuspended 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001260: Error Number: CS0029, 'Cannot implicitly convert type `string' to `OpenSim.Region.ScriptEngine.Common.LSL_Types.list''
DescriptionPrimitive: Error compiling script:

Line number 52, Error Number: CS0029, 'Cannot implicitly convert type `string' to `OpenSim.Region.ScriptEngine.Common.LSL_Types.list''
Additional Information// Global variables
list visitor_list;
float range = 20.0; // in meters
float rate = 1.0; // in seconds
 
 
// Functions
integer isNameOnList( string name )
{
    integer len = llGetListLength( visitor_list );
    integer i;
    for( i = 0; i < len; i++ )
    {
        if( llList2String(visitor_list, i) == name )
        {
            return TRUE;
        }
    }
    return FALSE;
}
 
// States
default
{
   
    
    on_rez(integer total_number)
{
llListen(0, "", llGetOwner(), "");
}

 state_entry()
    {
        llSay(0, "Visitor List Maker started...");
        llSay(0, "The owner can say 'help' for instructions.");
        llSensorRepeat( "", "", AGENT, range, TWO_PI, rate );
        llListen(0, "", llGetOwner(), "");
    }

      
                
    sensor( integer number_detected )
    {
        integer i;
        for( i = 0; i < number_detected; i++ )
        {
            if( llDetectedKey( i ) != llGetOwner() )
            {
                string detected_name = llDetectedName( i );
                if( isNameOnList( detected_name ) == FALSE )
                {
                    visitor_list += detected_name;
                }
            }
        }
    }
    
    listen( integer channel, string name, key id, string message )
    {
        if( id != llGetOwner() )
        {
            return;
        }
        
        if( message == "help" )
        {
            llSay( 0, "This object records the names of everyone who" );
            llSay( 0, "comes within "+ (string)range + " meters." );
            llSay( 0, "Commands the owner can say:" );
            llSay( 0, "'help' - Shows these instructions." );
            llSay( 0, "'say list' - Says the names of all visitors on the list.");
            llSay( 0, "'reset list' - Removes all the names from the list." );
        }
        else
        if( message == "say list" )
        {
            llSay( 0, "Visitor List:" );
            integer len = llGetListLength( visitor_list );
            integer i;
            for( i = 0; i < len; i++ )
            {
                llSay( 0, llList2String(visitor_list, i) );
            }
            llSay( 0, "Total = " + (string)len );
        }
        else
        if( message == "reset list" )
        {
            visitor_list = llDeleteSubList(visitor_list, 0, llGetListLength(visitor_list));
            llSay( 0, "Done resetting.");
        }
    }
}
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
EnvironmentMono / Linux32
Mono Version
Viewer
Attached Files

- Relationships

-  Notes
(0002719)
rjs (reporter)
2008-05-27 01:19

r4852 - Debian 4.0 - Mono 1.9.1

Primitive: Error compiling script:
 Line number 52, Error Number: CS0029, 'Cannot implicitly convert type `string' to `OpenSim.Region.ScriptEngine.Common.LSL_Types.list''


Same error at this point.
Status is closed and suspended.

Thank you,
--rjs

- Issue History
Date Modified Username Field Change
2008-05-14 03:26 rjs New Issue
2008-05-14 03:26 rjs SVN Revision => 3626
2008-05-14 03:26 rjs Run Mode => Grid (Multiple Regions per Sim)
2008-05-14 03:26 rjs Physics Engine => ODE
2008-05-14 03:26 rjs Environment => Mono / Linux32
2008-05-27 01:19 rjs Note Added: 0002719
2008-05-27 01:19 rjs Priority normal => none
2008-05-27 01:19 rjs Status new => closed
2008-05-27 01:19 rjs Resolution open => suspended


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker