Mantis Bug Tracker

View Revisions: Issue #8933 All Revisions ] Back to Issue ]
Summary 0008933: YEngine allows other data types to be used where string is expected
Revision 2021-10-05 17:09 by mewtwo0641
Additional Information // Test Script

SomeFunction(string input)
{
    llSay(0, "This is the result from SomeFunction(): " + input);
}

default
{
    state_entry()
    {
        integer someInteger = 10;
        llSay(0, "This is some integer: " + someInteger);
        
        float someFloat = 15.3;
        llSay(0, "This is some float: " + someFloat);
        
        vector someVector = <1,1,1>;
        llSay(0, "This is some vector: " + someVector);
        
        rotation someRotation = <1,1,1,1>;
        llSay(0, "This is some rotation: " + someRotation);
        
        key someKey = llGenerateKey();
        llSay(0, "This is some key: " + someKey);
        
        //Using expected string input
        SomeFunction("Hello");
        
        //Using unexpected data types
        SomeFunction(someInteger);
                
        SomeFunction(someFloat);
        
        SomeFunction(someVector);
        
        SomeFunction(someRotation);
        
        SomeFunction(someKey);
    }
}
Revision 2021-10-05 17:08 by mewtwo0641
Additional Information // Test Script

SomeFunction(string input)
{
    llSay(0, "This is the result from SomeFunction(): " + input);
}

default
{
    state_entry()
    {
        integer someInteger = 10;
        llSay(0, "This is some integer: " + someInteger);
        
        float someFloat = 15.3;
        llSay(0, "This is some float: " + someFloat);
        
        vector someVector = <1,1,1>;
        llSay(0, "This is some vector: " + someVector);
        
        rotation someRotation = <1,1,1,1>;
        llSay(0, "This is some rotation: " + someRotation);
        
        key someKey = llGenerateKey();
        llSay(0, "This is some key: " + someKey);
        
        //Using expected string input
        SomeFunction("Hello");
        
        //Using unexpected data types
        SomeFunction(someInteger);
        
        //Float doesn't work passed to a function expecting a string.
        //Gives undefined constant/function/variable error
        //SomeFuntion(someFloat);
        
        SomeFunction(someVector);
        
        SomeFunction(someRotation);
        
        SomeFunction(someKey);
    }
}
Revision 2021-10-05 17:07 by mewtwo0641
Additional Information // Test Script

SomeFunction(string input)
{
    llSay(0, "This is the result from SomeFunction(): " + input);
}

default
{
    state_entry()
    {
        integer someInteger = 10;
        llSay(0, "This is some integer: " + someInteger);
        
        float someFloat = 15.3;
        llSay(0, "This is some float: " + someFloat);
        
        vector someVector = <1,1,1>;
        llSay(0, "This is some vector: " + someVector);
        
        rotation someRotation = <1,1,1,1>;
        llSay(0, "This is some rotation: " + someRotation);
        
        key someKey = llGenerateKey();
        llSay(0, "This is some key: " + someKey);
        
        //Using expected string input
        SomeFunction("Hello");
        
        //Using unexpected data types
        SomeFunction(someInteger);
        
        //Float doesn't work passed to a funtion expecting a string.
        //Gives undefined constant/function/variable error
        //SomeFuntion(someFloat);
        
        SomeFunction(someVector);
        
        SomeFunction(someRotation);
        
        SomeFunction(someKey);
    }
}


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker