OnObjectMoved Error
#1

Hello,

I get these errors, how to fix them?

pawn Код:
#include <a_samp>
#include <streamer>
#include <zcmd>

#define         SPHERE_SPEED            0.1

new Float:CurrRot;
new DatSphere;
new DojoCatchme1;
new DojoCatchme2;
new CurrFrame;


CMD:dojo(playerid, arg[])
{
    SetPlayerFacingAngle(playerid,0);
    SetPlayerPos(playerid,7.8553,-3.1884,4199.59);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    return  1;
}

public OnFilterScriptInit()
{
    DojoCatchme1 = CreateObject(18981,7.853,2.164,4198.005,0.000,90.000,0.000,300.000);
    SetObjectMaterial(DojoCatchme1, 0, -1, "none", "none", 16711680);

    DojoCatchme2 = CreateObject(18981,7.853,24.164,4198.005,0.000,90.000,0.000,300.000);
    SetObjectMaterial(DojoCatchme2, 0, -1, "none", "none", 16711680);

    DatSphere = CreateObject(18844,7.951,13.240,4198.0, 0.000,0.000,0.000,300.000);
    SetObjectMaterial(DatSphere, 0, 3925, "weemap", "chevron_red_64HVa", -256);
    OnObjectMoved(DatSphere);
//
    new tmpobjid;
    tmpobjid = CreateDynamicObjectEx(19377,17.492,-10.366,4193.838,-89.999,0.414,90.415,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(1675,7.859,14.354,4195.363,0.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 2, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 3, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 4, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 5, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    tmpobjid = CreateDynamicObjectEx(1675,7.859,-0.003,4195.363,0.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 2, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 3, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 4, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 5, 14534, "ab_woozieA", "ab_wuzimirror", 0);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-1.776,12.821,4198.500,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-1.776,22.422,4198.500,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-1.776,3.203,4198.500,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,8.722,3.983,4198.489,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,8.722,22.422,4198.489,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-6.966,-5.625,4193.380,0.001,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-6.966,3.993,4193.378,0.001,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-6.966,13.592,4193.378,0.001,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-6.966,23.211,4193.378,0.001,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,8.722,-5.636,4198.509,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-1.776,-5.625,4198.520,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-1.776,32.041,4198.500,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,8.722,32.041,4198.489,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-6.985,32.041,4193.378,0.001,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-1.774,36.791,4193.802,89.999,135.000,134.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,8.722,36.793,4193.812,89.999,135.000,134.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,17.461,36.805,4193.802,89.999,135.000,134.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,17.461,32.041,4198.500,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,17.461,22.422,4198.500,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,17.461,12.821,4198.500,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,17.461,3.203,4198.500,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,9.762,38.479,4191.697,55.504,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,17.461,-5.625,4198.520,0.000,90.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 3967, "cj_airprt", "Slabs", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,22.672,-5.625,4193.378,0.000,0.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,22.652,3.203,4193.378,0.000,0.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,22.652,12.821,4193.378,0.000,0.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,22.652,22.422,4193.378,0.000,0.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,22.652,32.041,4193.378,0.000,0.000,179.998,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19325,-6.976,33.551,4200.645,0.000,0.000,180.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 8663, "triadcasino", "imperial03_128", 0);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,8.722,-10.376,4193.838,-89.999,0.414,90.415,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,-1.774,-10.387,4193.850,-89.999,0.414,90.415,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(3498,-7.065,36.886,4198.763,0.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(3498,-7.065,32.376,4202.963,90.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19325,22.663,33.551,4200.645,0.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 8663, "triadcasino", "imperial03_128", 0);//dojo1
    tmpobjid = CreateDynamicObjectEx(14414,7.802,38.728,4195.375,0.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(14414,7.722,-12.310,4195.375,0.000,0.000,179.999,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(3498,22.725,36.886,4198.763,0.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,9.761,-12.062,4191.697,55.504,0.000,179.999,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19377,5.763,38.479,4191.697,55.504,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 10386, "mountainsfs", "ws_stonewall", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(18751,-17.144,-1.439,4192.044,0.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 4242, "seabed", "desertstones256", -3355444);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 4242, "seabed", "desertstones256", -3355444);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 2, 4242, "seabed", "desertstones256", -3355444);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 3, 4242, "seabed", "desertstones256", -3355444);//dojo1
    tmpobjid = CreateDynamicObjectEx(3498,22.724,32.376,4202.963,90.000,0.000,0.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    tmpobjid = CreateDynamicObjectEx(19325,19.631,36.784,4200.645,0.000,0.000,90.000,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 8663, "triadcasino", "imperial03_128", 0);//dojo1
    tmpobjid = CreateDynamicObjectEx(3498,18.206,36.872,4202.963,89.999,89.999,-179.999,300.000,300.000);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 0, 14652, "ab_trukstpa", "wood01", -6710887);//dojo1
    SetDynamicObjectMaterial(tmpobjid, 1, 14652, "ab_trukstpa", "wood01", -6710
Код:
C:\Users\Arash\Desktop\dojo.pwn(33) : error 004: function "OnObjectMoved" is not implemented
C:\Users\Arash\Desktop\dojo.pwn(147 -- 148) : error 001: expected token: ",", but found "-end of file-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Yours Sincerely,
Arash
Reply
#2

You forgot to end this code.
pawn Код:
SetDynamicObjectMaterial(tmpobjid, 1, 14652, "ab_trukstpa", "wood01", -6710
For the other, it's a callback, not function.
Reply
#3

OnObjectMoved is a callback not a function/method, see this - https://sampwiki.blast.hk/wiki/OnObjectMoved
Just remove line 33 it will solve your problem.
Reply
#4

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
OnObjectMoved is a callback not a function/method, see this - https://sampwiki.blast.hk/wiki/OnObjectMoved
Just remove line 33 it will solve your problem.
Ok thanks, I'll try to
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)