errors
#1

pawn Код:
new bool: gMoveObjects;
new bool: MoveObjects;



forward MoveObjects(index);       //line 4675 ****************************

public MoveObjects(index)
{
    new Float: X, Float: Y, Float: Z;
    GetObjectPos(1608, 821.84656, -2044.69141, 15.45633);

    for(new i; i != MAX_PLAYERS; ++i)
    {
        if(IsPlayerInRangeOfPoint(i, 30.0, 821.84656, -2044.69141, 15.45633))
        {
            static time;
            switch(index %= 6)
            {
                case 0: time = MoveObject(objectid, 821.84656, -2044.69141, 15.45633, 3);
                case 1: time = MoveObject(objectid, 823.4802, -2071.3523, 15.4563, 4);
                case 2: time = MoveObject(objectid, 821.5845, -2072.7134, 15.6320, 5);
                case 3: time = MoveObject(objectid, 835.9559, -2088.6130, 15.6320, 6);
                case 4: time = MoveObject(objectid, 844.3004, -2084.1091, 16.0045, 7);
                case 5: time = MoveObject(objectid, 849.3589, -2059.7637, 15.6320, 8);
            }
            ++index;
            SetTimerEx("MoveObjects",time+150,false,"i",index);
            return ;
        }
    }
    gMoveObjects = false;
}
Quote:

(4675) : error 029: invalid expression, assumed zero
(4675) : error 012: invalid function call, not a valid address
(4675) : error 017: undefined symbol "index"
(4675) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#2

Delete this:
pawn Код:
new bool: MoveObjects;
Reply
#3

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Delete this:
pawn Код:
new bool: MoveObjects;
now :


C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4675) : error 029: invalid expression, assumed zero
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4675) : error 017: undefined symbol "MoveObjects"
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4676) : error 029: invalid expression, assumed zero
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4676) : error 017: undefined symbol "MoveObjects"
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4679) : error 035: argument type mismatch (argument 2)
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4686) : error 017: undefined symbol "index"
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4686) : error 029: invalid expression, assumed zero
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4688 ) : error 014: invalid statement; not in switch
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4688 ) : error 001: expected token: ";", but found ":"
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4688 ) : error 029: invalid expression, assumed zero
C:\Users\NoamPC\Desktop\תיקיה חדשה (4)\MultiCoreV1.pwn(4688 ) : fatal error 107: too many error messages on one line
Reply
#4

pawn Код:
GetObjectPos(1608, 821.84656, -2044.69141, 15.45633);
Wrong. Read here: https://sampwiki.blast.hk/wiki/GetObjectPos

pawn Код:
MoveObject(objectid,
Have you defined what 'objectid' is?

Other than those few things, the code compiles fine for me. The issue is within your script somewhere else. You have probably put the 'public MoveObjects(index)' within another function or callback most likely..
Reply
#5

delete pls
Reply
#6

Quote:
Originally Posted by Threshold
Посмотреть сообщение
pawn Код:
GetObjectPos(1608, 821.84656, -2044.69141, 15.45633);
Wrong. Read here: https://sampwiki.blast.hk/wiki/GetObjectPos

pawn Код:
MoveObject(objectid,
Have you defined what 'objectid' is?

Other than those few things, the code compiles fine for me. The issue is within your script somewhere else. You have probably put the 'public MoveObjects(index)' within another function or callback most likely..
thanks but now i get unfined symbol objectid error..
- my objectid is 1608 .. so how to define it ?
Reply
#7

help
Reply
#8

Your object ID won't always be the same... it changes every time you restart your server.
Can you show me where you create the object?
Reply
#9

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Your object ID won't always be the same... it changes every time you restart your server.
Can you show me where you create the object?
on the public OnGameModeInit()
my object id is 1608 (shark) ..
Reply
#10

Can you show me the line? -_-

And please don't post a visitor message on my profile every time you make a reply, I can see all replies to the threads I post in.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)