Don't click here unless you want to be banned.

LSL Wiki : errors

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are


There are lots of LSL errors that can occur in SL. This page describes error messages that can arise when a script is compiled, or when it tries to do something it isn't allowed to do. Problems with a script itself are called "bugs" or "glitches".

Note: Errors caused by incorrect parameter lists in calls to llParticleSystem, llSetPrimitiveParams, and llGetPrimitiveParams aren't shown in chat but instead as popup windows in the online notification area (lower right) and can be reviewed by opening the chat history window (CTRL-H).

Compiler | Run-Time | Build

Compiler Errors

(occur when script is compiled)

Error Message Explanation Example (error) Fix
SyntaxError Compiler cannot understand what is trying to be done. if (llGetLitLength(l) > 0) retun TRUE; if (llGetListLength(l) > 0) return TRUE;
Type mismatch A variable was used of the wrong type integer i; i = "cat"; string i; i = "cat";
Function call mismatches type or number of arguments Check parameter types and number of parameters passed to function. llSetTexture("wood"); llSetTexture("wood", ALL_SIDES);
Name not defined within scope Access to undeclared variable or user-defined function. llSetText("monkeys",blue,1); vector blue = <0,0,1>; llSetText("monkeys!",blue,1);
Name previously declared within scope Declaration of a variable or function with a name that already exists. list myThings; string myThings; list lMyThings; string sMyThings;
Uninitialized variables can't be included in lists An undeclared variable was added to a list. list cactus=[10, var1] integer var1 = 3; list cactus=[10, var1];
Use of vector or quaternion method on incorrect type Tried to get a component of a non-component type. float fNotAVector; fNotAVector.x = 3.0; vector vActuallyAVector; vActuallyAVector.x = 3.0
Lists can't be included in lists self-explanatory list L = [2, 3]; list M = [5, L]; list L = [2, 3]; list M = [5] + L; or use a fake array
Return statement type doesn't match function return type Return type must match function declaration. string foo() { integer x = 3; return x; } string foo() { integer x = 3; return (string)x; }
Function returns a value but return statement doesn't Replace return; with return something; string function() { return; } string function() { return "Test"; }
Not all code paths return a value Add more returns. function() { if (1) return TRUE; else x++; }function() { if (1) return TRUE; else {x++; return FALSE} }
Dead code found beyond return statement Don't put code after a return. bar() { llSay(0, "I like babies."); return; llSay(0, "Not."); } bar() { llSay(0, "I like babies."); llSay(0, "Not."); return;}
Global functions can't change state This is a limitation of the virtual machine. foo() { state bar; } See hacks.
Expression must act on LValue assignment to a non-variable 2 += 3; integer x = 2; x += 3;
Declaration requires a new scope -- use { and } declared a variable in a single line flow control situation do integer a = 6; while(1); do{ integer a = 6; }while(1);
Token buffer overflow The compiler is broken, report as bug and send script to LL
Not enough space for parser stacks The compiler is likely broken, report as bug and send script to LL
Parser stack overflow The compiler is broken, report as bug and send script to LL
Byte code assembly failed -- out of memory The code is too big to even compile into 16k. Split scripts (link_message)
No scanner

An error will also occur if you run out of disk space and try to save a script.

Run-Time Errors

(occur when something bad happens when the script is already compiled and running)

Error Message Explanation
MathError Occurs when a mathematical operation returns NaN or infinity.
StackHeapCollision ran out of memory
Chat Overrun Chat string was > 255 characters
This shouldn't happen anymore; LL fixed it so chat functions truncate rather then trigger this error.
Too many listens Too many open llListen handles; remove some with llListenRemove.
Bounds Check Error Apparently, happens if the message queue overflows. Managed to cause this by sending link messages to 50 prims at once. It may also occur if you enter too many items into the list for a call to llGiveInventoryList(). Can also occur if you try to say a null return:
string foo()
    if ("bar" == "bar") return;
    return "";

Heap Error This one is usually caused by a problem with the SL virtual machine's code. Occasionally, it can be caused by the state-change-within-function hack, or the script jumped around a variable declaration and tried to access the variable's value. I have had one instance where 2 scripts trying to take the same control inputs has caused this error - Ice
Hit Sandbox Limit An object with STATUS_SANDBOX set tried to cross a sim boundary or went more than 10 meters from the location where STATUS_SANDBOX was set.
This isn't really an error; more of a notification.
Lists may not contain lists A list cannot be nested in another list, but the script will compile if tried.
list a = [[1]];
llx error running rule #y: non-z rule. Function llx is passed a list as a parameter, y is the index value where there is a type mismatch, at this index it is expecting the value to be of type z
Functions: llSetPrimitiveParams, llGetPrimitiveParams, llParticleSystem
llx error running rule #y: unknown rule. Function llx is passed a list as a parameter, y is the index value where there is an unknown rule type.
Functions: llSetPrimitiveParams, llGetPrimitiveParams, llParticleSystem

Build Errors

(occur when something bad happens when building; not necessarily script-related, but can be)

Error Message Explanation Fix
Could not save the script because the object it is on could not be found. The object may be out of range or may have been deleted. Also, "Script (object out of range)" in script window titlebar. The script is too far away from your avatar. Move your avatar closer (back in range) of the script (or move the object the script is in closer to your avatar).
Can't enable physics for objects that interpenetrate others A prim/object is trying to be made physical but is penetrating another prim/object or the ground. This error no longer occurs with the new Havok4 engine, which attempts to push interpenetrating objects out from each other." -Nelson Move prims/objects away from each other and/or the ground. The physics engine's accuracy is only good to 10cm between objects so a prim will fail to become physical within that distance. This error can even occur when the object being set physical is phantom.' -Ice
Pieces too far apart Prims are too far apart when linking. More info: link, PiecesTooFarApart move prims closer, resize prims, add more closely spaced prims

LSL Jasa SEO Murah Jasa SEO Jasa Google Adwords Jasa Adwords Google Adwords Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Govr Edo Ziedo Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Penumbuh Rambut Kursus SEO Jam Tangan Casio Grosir Baju Bisnis Online Kerupuk Kulit Social Bookmark Kumpulan Puisi WBC Wonogiri Penumbuh Rambut Jam Tangan Murah Jam Tangan Murah Jam Tangan Casio Penumbuh Rambut Kerupuk Kulit Alat Kantor Belanja Online Grosir Eceran Murah dan Aman Jasa SEO Model Jilbab Fine Tableware Permanent Hair Removal island investment development professional makeup artist bali private villa sewa mobil jakarta murah Jual rumah Jakarta Contact Lens Technology
Comments [Hide comments/form]
I love you guys :3
Finally a place to post and read about LSL errors!!! :D
-- ChristopherOmega (2004-04-24 21:37:13)
Attach a comment to this page: