i cant see why i'm getting thos errors
#1

The Lines

PHP код:

forward TheTrackAutoMove
(objectid);
public 
TheTrackAutoMove(objectid){
if(
objectid == TheTrack && GetObjectPos(TheTrack,1584.6698, -1364.7050332.8880))return MoveObject(TheTrack,1915.9042, -1364.656717.6129,2.4,22.7400, -91.0800, -339.6000);
if(
objectid == TheTrack && GetObjectPos(TheTrack,1915.9042, -1364.656717.6129)) return MoveObject(TheTrack,1915.9042, -1364.656717.6129,2.4,22.7400, -91.0800, -339.6000);
return 
1;} 
The ERRORS

PHP код:

(1276) : error 035argument type mismatch (argument 2)
(
1277) : error 035argument type mismatch (argument 2
thnks Ad
Reply
#2

pawn Код:
forward TheTrackAutoMove(objectid);
public TheTrackAutoMove(objectid)
{
    if(objectid == TheTrack && GetObjectPos(TheTrack, 1584.6698, -1364.7050, 332.8880))
    {
        MoveObject(TheTrack, 1915.9042, -1364.6567, 17.6129, 2.4, 22.7400, -91.0800, -339.6000);
        return true;
    }
   
    else if(objectid == TheTrack && GetObjectPos(TheTrack, 1915.9042, -1364.6567, 17.6129))
    {
        MoveObject(TheTrack, 1915.9042, -1364.6567, 17.6129, 2.4, 22.7400, -91.0800, -339.6000);
        return true;
    }
    return true;
}
Make your code more clearly, and the reason is (I guess) that you returned MoveObject. MoveObject function returns a value it self. Check this code, if you still got an error, post it on forum.

edit://
@down, what my big mistake. Sorry. I forgot, that you have to save coordinations to local/global float variable, hah! But still.. he shouldn't return this function.. he can, but anyways..
Reply
#3

pawn Код:
forward TheTrackAutoMove(objectid);
public TheTrackAutoMove(objectid)
{
    if(objectid == TheTrack) {
        new Float:x, Float:y, Float:z;
        GetObjectPos(TheTrack, x, y, z);
        if(x == 1584.6698 && y == -1364.7050 && z == 332.8880)
            return MoveObject(TheTrack,1915.9042, -1364.6567, 17.6129,2.4,22.7400, -91.0800, -339.6000);
    }
    if(objectid == TheTrack) {
        new Float:x, Float:y, Float:z;
        GetObjectPos(TheTrack, x, y, z);
        if(x == 1915.9042 && y == -1364.6567 && z == 17.6129)
            return MoveObject(TheTrack,1915.9042, -1364.6567, 17.6129,2.4,22.7400, -91.0800, -339.6000);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)