View Single Post
  #10   Spotlight this post!  
Unread 29-04-2005, 17:59
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: #define and #ifdef/endif

When using the scripting/navigation code provided by Kevin Watson, u would call a switch statement with the following parameter:
Code:
command_list[current_command].command
I want to have different scripts.

Code:
 int check_switch_box(void) 
{
if(rc_dig_in01==1) 
return command_list_1[current_command].command;
}
So theoretically, i could call
Code:
switch(check_switch_box()){}
instead of
Code:
switch(command_list[current_command].command){}
?

That should work, right? Since command_list[current_command].command really is just a value inside a struct.
__________________