: : : void main (void)
: : : {
: : : int &i;
: : : int &bad = &evil;
: : : }
: : : void hit (void)
: : : {
: : : say_stop("'4Thug! Suffer our justice!",¤t_sprite);
: : : sp_target(¤t_sprite,1);
: : : }
: : : loophere;
: : : if (&i < 5000);
: : : {
: : : if (&evil > &bad ) sp_target(¤t_sprite,1);
: : : wait (250);
: : : &i += ;
: : : goto loophere;
: : : }
: : : I *think* that everything has to be within a procedure... since main() is called at birth, it is a decent choice for such stuff.
: : : Oh, one more thing, &i was a very stupid variable choice on my part... if you have another variable name that begins with "&i" you might have troubles.
: : I changed the &i (good idea for the future.) I think the loop is in one proc. if I get your meaning. In my efforts, I ended up debugging several other things but the guard still isn't reading the attack on others. maybe I'll try a change storywise. Or do you think this is a good aproach? Thanks once again............Ric
: The loop isn't in a procedure. For example...
: //This is good
: void main(void) {
: say("Aha!',1);
: }
: void talk(void) {
: say("Aha Again!",1);
: }
: //This is bad
: void main(void) {
: say("Aha!",1);
: }
: say("Aha Again!",1);
: Everything in a script has to be within the brackets of main, hit, talk, damage, or some other "void BLAH (void)". The loop isn't, so that loop code is never run.
I'm starting to see, (i think..)
void hit (void)
{
loophere;
if &i < 5000;
{
//and so forth..........Ric
: Everything in a script has to be within the brackets of main, hit, talk, damage, or some other "void BLAH (void)". The loop isn't, so that loop code is never run.
In theory, yes. But this works anyway:
void main ( void )
{
say_stop("Inside brackets.", 1);
goto outside;
inside:
say_stop("Inside brackets.", 1);
}
outside:
say_stop("Outside brackets!", 1);
goto inside;
// stop scrip from falling off the edge of the world.
: : Everything in a script has to be within the brackets of main, hit, talk, damage, or some other "void BLAH (void)". The loop isn't, so that loop code is never run.
: In theory, yes. But this works anyway:
: void main ( void )
: {
: say_stop("Inside brackets.", 1);
: goto outside;
: inside:
: say_stop("Inside brackets.", 1);
: }
: outside:
: say_stop("Outside brackets!", 1);
: goto inside;
: // stop scrip from falling off the edge of the world.
Wait no it doesn't, it needs return; at the end of main. Or it turns into a loop. (which goes to show, just because you can do weird things like this, doens't mean you should)
Sorry if I'm confusing you Ric, pay no attention. :)
: : : Everything in a script has to be within the brackets of main, hit, talk, damage, or some other "void BLAH (void)". The loop isn't, so that loop code is never run.
: : In theory, yes. But this works anyway:
: : void main ( void )
: : {
: : say_stop("Inside brackets.", 1);
: : goto outside;
: : inside:
: : say_stop("Inside brackets.", 1);
: : }
: : outside:
: : say_stop("Outside brackets!", 1);
: : goto inside;
: : // stop scrip from falling off the edge of the world.
: Wait no it doesn't, it needs return; at the end of main. Or it turns into a loop. (which goes to show, just because you can do weird things like this, doens't mean you should)
: Sorry if I'm confusing you Ric, pay no attention. :)
I'm learning a lot from this too! thanx....Ric