Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

what does this error mean?

Harminoff Hadlee
Registered User
Join date: 13 Jul 2004
Posts: 35
07-29-2004 15:08
Invalid parameter in llGiveMoney().

ok i have give money in one state and money in another.

in give money :
llGiveMoney(key givver, integer amount);
key is givver

and in money the key is giver.

i did this, and changed key givver = (key) giver in it.


reason is because i cant get the key to transfer elsewise.

is this error because i am playing a game that is registered under me, or is it that it doesnt understand givver?


ok i called key giver, and money=0 uptop. im afraid though that it wont pay out the right amount, and will pay out 0 on a win, is this correct?
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-29-2004 15:46
It will usually give this error if amount <= 0, or you're passing an invalid key (or NULL_KEY) in the first parameter.
==Chris
Harminoff Hadlee
Registered User
Join date: 13 Jul 2004
Posts: 35
07-29-2004 15:54
ok. so how do i set money in one state, and take over the giver and ammount to another state?
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-29-2004 15:59
Im still not sure what your trying to do.
If you are unable to explain your problem a bit more throughly, I suggest posting the portion of your code where the problem(s) occur(s).
Harminoff Hadlee
Registered User
Join date: 13 Jul 2004
Posts: 35
07-29-2004 16:38
here is an example


integer multiplier = 2;
default {
money(key giver, integer cash)
}


state play {
state_entry() {
llGiveMoney(giver, cash*multiplier);
}


see it asks for money in the first state, then gives double your money back.

that is a very little example, but it shows what i mean.
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-29-2004 16:49
WHat you can do, is have a global variable called cash, and set cash in the money event, and get cash in the play state, in llGiveMoney.
Harminoff Hadlee
Registered User
Join date: 13 Jul 2004
Posts: 35
07-29-2004 16:57
ok so cash will update the global variable for the next state? i thought that in each state it starts back at what global variable had it set to.
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
07-29-2004 17:22
No, global variables persist across states. States would be pretty useless if they didn't.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Harminoff Hadlee
Registered User
Join date: 13 Jul 2004
Posts: 35
07-29-2004 17:32
ok so i call
key giver;
integer cash=0;

and i still get the error.

i think its because of the 0<= thing. but shouldnt the first state change the 0?
Hank Ramos
Lifetime Scripter
Join date: 15 Nov 2003
Posts: 2,328
07-29-2004 17:34
Try the example I posted at the following thread today...

/54/b0/18825/1.html
_____________________
Harminoff Hadlee
Registered User
Join date: 13 Jul 2004
Posts: 35
07-29-2004 17:42
heh that was simple, thanks.