• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-185
Type: Bug Bug
Status: Fix Pending Fix Pending
Priority: Low Low
Assignee: Andrew Linden
Reporter: Lex Neva
Votes: 11
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

llParticleSystem (and others) anal about types

Created: 05/May/07 08:32 AM   Updated: 22/Oct/09 04:48 PM
Return to search
Component/s: Scripts
Affects Version/s: None
Fix Version/s: None

Issue Links:
Relates

Last Triaged: 14/Apr/09 10:23 AM
Linden Lab Issue ID: DEV-30657


 Description  « Hide
I write a lot of particle systems, and this behavior annoys me. In short, if you have a parameter like PSYS_SRC_ANGLE_BEGIN that requires a float, and you pass "0" to it, the particle system fails. The system returns an error, "PSYS_SRC_ANGLE_BEGIN requires float data".

It's technically accurate in its behavior: it checks that the next list parameter is a float, finds out it's not, and instantly bails out and complains. If I'd passed a vector, I'd expect something like this. But when I pass "0", instead of "0.0", it's like a slap in the face from an annoying brat; "you didn't say please!". It'd be fairly easy for it to simply cast the integer I pass into a float... after all, small integers like 0 can be represented precisely in a float.

Interestingly, PSYS_SRC_TARGET_KEY can take a key or a texture name in inventory. The key can be passed either as a string-value representation of a key or as an actual key type. So I know it's possible to take multiple data types and munge them into the proper type.

Requested solution: make functions like llParticleSystem and llSetPrimitiveParams just a tiny bit more intelligent as far as handling numerical data types.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Strife Onizuka added a comment - 13/Jun/07 02:21 PM
I happen to agree, the type checking has always been too anal for even me.

Rob Kubrick added a comment - 06/Aug/07 03:53 PM
I completly agree.

But, it may be a bit harder than that.. Since the "0" is likely casted to integer at compile time, it would require that LSL gain a little more type flexibility. Probably, best to wait till Mono overhaul.

Please allow time-saving typeless variables (javascirpt/php/etc.).


Lex Neva added a comment - 11/Aug/07 10:15 AM
Well, the problem is definitely that "0" is of type integer, but we know from the error message that llParticleSystem and llSetPrimitiveParams check their types at run-time. The type-checking code could be relaxed to munge between numerical types as necessary, without changing the actual LSL interpreter or compiler.

WarKirby Magojiro added a comment - 24/Dec/07 05:03 PM
PSYS_SRC_TARGET_KEY requires the input to be in key format. I tried it with a string literal earlier tonight, and it was complaining about an error. Particularly annoying, and this is very inconsistent with a lot of other functions.

I think the compiler should sort them out.


WarKirby Magojiro added a comment - 29/Aug/08 07:17 AM
bump!

Any idea if this will be fixed in the mono client release? It's rather frustrating.


Andrew Linden added a comment - 14/Jul/09 09:06 AM
When triaging this I investigated the code to see how hard it would be to implement this. It was so easy I just did it on the side while simultaneously attending some meeting. Dunno when this will get deployed.

Cummere Mayo added a comment - 14/Jul/09 09:19 AM
Glad to see its finally getting fixed. Thanks andrew!

Lex Neva added a comment - 14/Jul/09 01:51 PM
Oh sweet! Thanks Andrew, and I'm glad this was such an easy fix.

Strife Onizuka added a comment - 14/Jul/09 02:36 PM
I had written this one off, good to see it's getting addressed.

Moon Metty added a comment - 22/Oct/09 04:48 PM
Ok, you can now use:
//...
PSYS_SRC_BURST_RADIUS, (integer)"three and a bit",
//..

and the script will make no objection.

It may be a small fix, but it really was annoying.

=======

Second Life 1.23.5 (136262) Oct 14 2009 12:08:26 (Second Life Release)
Built with MSVC version 1400

You are at 255437.2, 256507.8, 35.1 in Morris located at sim3008.aditi.lindenlab.com (216.82.49.220:12035)
Second Life Beta Server 1.32.0.136920

CPU: Intel Core 2 Series Processor (2401 MHz)
Memory: 2048 MB
OS Version: Microsoft Windows XP Service Pack 3 (Build 2600)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce GTS 250/PCI/SSE2
Windows Graphics Driver Version: 6.14.0011.8206
OpenGL Version: 3.0.0

libcurl Version: libcurl/7.18.1 OpenSSL/0.9.8j zlib/1.2.3
J2C Decoder Version: KDU
Audio Driver Version: FMOD version 3.740000
LLMozLib Version: [LLMediaImplLLMozLib] - 2.01.27769 (Mozilla GRE version 1.8.1.21_0000000000)
Packets Lost: 3087/730341 (0.4%)