Skip to content

A list of lsl-luau vs mono discrepancies observed on luau 2026-07-24 channel #110

Open

Description

@mercurylinden

Here is a list of observed differences between Mono and LSL VM:


float nan = (float)"nan";

llOwnerSay((string)(nan >= 1.0)); // Output: LSO=math error Mono=1 LSL-LUAU=0

llOwnerSay((string)(nan <= 1.0)); // Output: LSO=math error Mono=1 LSL-LUAU=0

And a test script:


integer param(integer p)

{

    return p++ + p;

}

default

{

    state_entry()

    {

        integer a = 1;

        llOwnerSay("1 (Mono = 0): " + (string)((a = 2) == a)); // Output in lsl-luau: 1

        a = 1;

        llOwnerSay("2 (Mono = 1): " + (string)(a++ == a)); // Output in lsl-luau: 0

        llOwnerSay("3 (Mono = 2): " + (string)param(1)); // Output in lsl-luau: 3

        // float->int cast

        float f = 0.7;

        llOwnerSay("4 (Mono = 7): " + (string)((integer)(f * 10.0))); // Output in lsl-luau: 6

        integer i = 16777217;

        float z = 0.0;

        llOwnerSay("5 (Mono=  16777216): " + (string)((integer)(i + z))); // Output in lsl-luau: 16777217

        // bit shifts

        integer s = 32;

        llOwnerSay("6 (Mono = 1): " + (string)(1 << s)); // Output in lsl-luau: 0

        llOwnerSay("7 (Mono = -2147483648): " + (string)(1 << -1)); // Output in lsl-luau: 0

        llOwnerSay("8 (Mono = 4): " + (string)(8 >> 33)); // Output in lsl-luau: 0

    }

}

https://secondlife.canny.io/admin/feedback/slua-alpha/p/a-list-of-lsl-luau-vs-mono-discrepancies-observed-on-luau-2026-07-24-channel

Activity

  1. self-assigned this
    on Nov 4, 2026
  2. added theissue type on Nov 4, 2026
  3. added this to the SLua Sensibility milestone on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions