• 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: Open Open
Priority: Low Low
Assignee: Unassigned
Reporter: Lex Neva
Votes: 9
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: 14/Apr/09 10:23 AM
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.