PDA

View Full Version : Whats wrong...


Aknts
07-30-2001, 11:24 AM
Whats wrong with this script the stars dont move?


if (created) {
this.stars=20;
this.s=1;
this.sfdef={26,56,20,2};
this.speed={1,1};
//
setarray this.star, this.stars*3;
for (this.s=0;this.s<this.stars;this.s++) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0]+
this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef[1
]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])/1
0;
}
timeout = .05;
}
if (timeout) {
for (this.s=0;this.s<this.stars;this.s++) {
if (this.star[this.s*3+1]>this.sfdef[1]+this.sfdef[3]) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0
]+this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef
[1]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])
/10;
}
else this.star[this.s*3+1]+=this.star[this.s*3+2];
showimg this.s,kstar.gif,this.star[this.s*3],this.star[this.s*3+1];
}
timeout = .1;
}

KJS
07-30-2001, 12:01 PM
what is this not doing???
i dont feel like putting it into a npc..
and are you putting it in a npc server or not???

Aknts
07-30-2001, 01:50 PM
*bump*

Falcor
07-31-2001, 12:11 AM
if (created) {
this.stars=20;
this.s=1;
this.sfdef={26,56,20,2};
this.speed={1,1};
setarray this.star,this.stars*3;
for (this.s=0;this.s<this.stars;this.s++;) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0]+this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef[1]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])/10;
}
timeout = 0.1;
}
if (timeout) {
for (this.s=0;this.s<this.stars;this.s++;) {
if (this.star[this.s*3+1]>this.sfdef[1]+this.sfdef[3]) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0]+this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef[1]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])/10;
}else {
this.star[this.s*3+1]+=this.star[this.s*3+2];
}
showimg this.s,kstar.gif,this.star[this.s*3],this.star[this.s*3+1];
}
timeout = 0.1;
}




There. You forgot the ; at the end of your for loops. hehehe

zokemon
07-31-2001, 12:53 AM
LOL!!!!!!!

Merlin
07-31-2001, 01:09 AM
Originally posted by zokemon
LOL!!!!!!!
stop spamming and jump off the earth.

Brady2
07-31-2001, 07:36 AM
Jadis:

You shouldn't need ;'s at the end of the for loop

for (hi=0;hi<1;hi++) setplayerprop #c,hi;

ZORG1986
07-31-2001, 10:28 AM
Damn none of these messages are really helping solve the problem, i bet no one reading this has turned the code into an NPC yet, cause i know i haven't :P

General
07-31-2001, 11:29 AM
The skull kreeps me out