To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1760
1759  |  1761
Subject: 
Re: video game type thing...
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 13 Mar 2001 03:27:35 GMT
Viewed: 
1471 times
  
I worked on that. I'm having trouble with "execi()" and some stuff related
to it. Here's the offending area, but not the entire program:

int main(int argc, char **argv)
{
pid1=execi(&startup, 0, NULL, 1, DEFAULT_STACK_SIZE);
MYexit = -1;
cputs("x");
enemy = 1;
if(TOUCH_2)
{
if(enemy == 1 && MYexit == -1)
{
fight();
monitor();
}
}

kill(t1);
}
---------------------------------------------------------------
I'm pretty sure that I'm not supposed to be messing with int main like this,
but I have to get it so that it stops itself, but not the rest of the program.

Thanks,
Nick H.



Message has 1 Reply:
  Re: video game type thing...
 
(...) <-- Cut -- > (...) Shouldn't thist say kill(pid1); ? - ciaran (24 years ago, 13-Mar-01, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: video game type thing...
 
Thanks for the response! Now I'm almost ready to test it. I just need to know if, when you have a call void function, and you then use the int main() to close the program with return 0;, will the void keep running? Here's my current copy, without (...) (24 years ago, 12-Mar-01, to lugnet.robotics.rcx.legos)

13 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR