Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Simple Script Help

Smithy Zeno
ownes 9 pet cacti
Join date: 3 Aug 2006
Posts: 52
11-10-2007 10:28
Hey all,

I've been working on a donation script. There is one part I'm stuck on - setting the goal. The piece of code below shows the part that is giving me trouble.

CODE

integer goal;
integer num;

default
{
on_rez(integer start)
{
llResetScript();
}
state_entry()
{
ownerkey = llGetOwner();
owner_name = llKey2Name(ownerkey);
num = FALSE;
llSleep(0.2);
update();
llSay(0, "Online!");
llSleep(0.5);
llListen(0, "",ownerkey,"");
}
listen(integer channel, string name, key id, string message)
{
if(num == FALSE)
{
if(llToLower(message)=="setgoal")
{
llSay(0, "Please say the number for the goal to be set to.");
num = TRUE;
}
}
else
{
(string)goal == (string)goal + message;
num = FALSE;
llSay(0, "Goal set to "+(string)goal+".");
}
}
}


Thanks in advance.
_____________________
-Smithy
Ravanne Sullivan
Pole Dancer Extraordinair
Join date: 10 Dec 2005
Posts: 674
11-10-2007 10:42
(string)goal == (string)goal + message;


Should be:

goal = goal + (integer)message;
_____________________
Ravanne's Dance Poles and Animations

Available at my Superstore and Showroom on Insula de Somni
http://slurl.com/secondlife/Insula de Somni/94/194/27/
Smithy Zeno
ownes 9 pet cacti
Join date: 3 Aug 2006
Posts: 52
11-10-2007 10:45
Thanks a bunch
_____________________
-Smithy
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
A script writing pole dancer....
11-10-2007 19:48
...be still my heart.