Reply to Re: Help with a Script
If you don't have an account, just leave the password field blank.
I'm totally confused as to what this script actually does...
First of all get_sprite_with_this_brain() takes two integers as parameters, so having the text 'bowl' or 'cereal' there should always return 0.
Secondly you compare the sprite numbers to 1 next, this would imply that the sprite is Dink. That can be known in advance since Dink is the only one with a brain 1. Also the check is a bit superfluous as the only thing it does is a goto command to a place it would goto anyway. As it is you could just as well remove this entire part as it does absolutely nothing, even when the get_sprite_with_this_brain() part is fixed:
In the same way you can remove the goto commands to partyin in this part:
Also, I don't see you having declared &seat anywhere. I assume this is a global then?
First of all get_sprite_with_this_brain() takes two integers as parameters, so having the text 'bowl' or 'cereal' there should always return 0.
Secondly you compare the sprite numbers to 1 next, this would imply that the sprite is Dink. That can be known in advance since Dink is the only one with a brain 1. Also the check is a bit superfluous as the only thing it does is a goto command to a place it would goto anyway. As it is you could just as well remove this entire part as it does absolutely nothing, even when the get_sprite_with_this_brain() part is fixed:
if(&bowl == 1) { if(&cereal == 1) { goto seat; } } if(&cereal == 1) { if(bowl == 1) { goto seat; } }
In the same way you can remove the goto commands to partyin in this part:
if(&result == 1) { &seat = 1; goto partyin; } if(&result == 2) { &seat = 2; goto partyin; }
Also, I don't see you having declared &seat anywhere. I assume this is a global then?