Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   all most thar, plez help (http://www.chiefdelphi.com/forums/showthread.php?t=73725)

BrandonD-1528 06-02-2009 09:15

all most thar, plez help
 
All of our teams vetrens mebers graduwated last year and we have no programing mentor, were so close to geting our cood working, were down to the last 5 err0rs and eney help would be gratly apresheated.

Code:

if (leftStick.GetY() >= (1 - k))       
        {       
                leftMotor.set(leftStick.GetY());
        }

error: 'leftmotor' undeclared (first use this function)

Code:

if ((leftStick(1).GetY() < (1 - k)) && (leftStick.GetY() > k))       
        {       
                if (leftStick.GetY() > leftMotor.get())
                {

error:no mach for call to '(joystik)(int)'

Code:

if (rightStick.GetY() >= (1 - k))               
 
        {       
                rightMotor.set(rightStick.GetY());
        }

error: rightStick undeclared(first use this function)
error: rightMotor undeclared(first use this function)
Code:

Start_Robot_Class(RobotDemo);
error:new types may not be defined in a return type.

martin417 06-02-2009 09:26

Re: all most thar, plez help
 
Brandon,

I can't help with your code, but may I suggest you refrain from "cute" spelling and grammar? (I am giving you the benefit of the doubt here, that your atrocious grammar and spelling are intentional). Someone may see your post and assume that you don't care enough to put the effort of proper English into asking for help, and may be unwilling to put forth the effort to help.

(puts on flame suit in preparation for expected attacks)

Racer26 06-02-2009 09:46

Re: all most thar, plez help
 
It sounds to me as though you have not declared your left and right motors
you would have to use something like:

Jaguar leftMotor*;
Jaguar rightMotor*;

This goes in the class components, at the top of the RobotDemo class

then you put:

leftMotor = new Jaguar(1);
rightMotor = new Jaguar(2);

You put this with the other declarations in the "RobotDemo" class constructor.

also, it sounds like your right joystick is also not defined. you would have to use

Joystick rightStick*;

rightStick = new Joystick(2);

in the same two places mentioned above.

Your second error is because you're calling leftStick(1).GetY(), instead of just leftStick.GetY();

BrandonD-1528 06-02-2009 09:53

Re: all most thar, plez help
 
Sorry i am dyslexic the worst in the hole tristate rigon and i forgot to spell check the title and did not mean to sound "cute".

BrandonD-1528 06-02-2009 10:05

Re: all most thar, plez help
 
thank you we fix these errors but does any one know whats up with the last error.

Racer26 06-02-2009 12:14

Re: all most thar, plez help
 
Its hard for us to tell without seeing the rest of your code. I recommend posting your entire CPP file, as its usually the result of some minor syntax error.


All times are GMT -5. The time now is 02:21.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi