Im stuck with my FS
#1

Hi Scripters, Players, Users.

I am trying to make a Filterscript for my gates and stuff.

i watched movies on ******* and i did exact what they did but i get this problem

C:\Users\Stefan Dorst\Desktop\backup\filterscripts\gates.pwn(32) : warning 202: number of arguments does not match definition
C:\Users\Stefan Dorst\Desktop\backup\filterscripts\gates.pwn(3 : error 010: invalid function or declaration
C:\Users\Stefan Dorst\Desktop\backup\filterscripts\gates.pwn(40) : error 021: symbol already defined: "MoveObject"
C:\Users\Stefan Dorst\Desktop\backup\filterscripts\gates.pwn(43) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

this is my script.

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#define FILTERSCRIPT

#define COLOR_BLUE 0x1229FAFF

new agate;






public OnGameModeInit()
{

    agate = CreateObject(969,924.79998779,-1212.00000000,16.12999916,0.00000000,0.00000000,270.00000000); //object(electricgate) (1)
    CreateObject(980,924.79998779,-1226.50000000,18.70000076,0.00000000,0.00000000,270.00000000); //object(airportgate) (2)
 }
 



public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/openagate", cmdtext, true, 10) == 0)
   
    MoveObject(agate, 969, 924.79998779, -1212, 16.12999916, 1);
    SendClientMessage(playerid, COLOR_BLUE, "The Admin Gate Is Now Opening...");
   
    return 1;
    }
   
    if (strcmp("/closeagate", cmdtext, true, 10) == 0)

    MoveObject(agate, 980, 924.79998779, -1226.50000000, 18.70000076, 1);
    SendClientMessage(playerid, COLOR_BLUE, "The Admin Gate Is Now Closing...");

    return 1;
    }
Reply
#2

First of all, you said "Im stuck with my FS" and you used OnGameModeInit.
Moreover, there is number of arguments does not match definition because it doesn't need to put the object id, you are already have it "agate" and the gate will not move because you haven't put your coordinates where the gate should be moved
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>

#define FILTERSCRIPT
#define COLOR_BLUE 0x1229FAFF

new agate1;
new agate2;

public OnFilterScriptInit()
{
    agate1 = CreateObject(969,924.79998779,-1212.00000000,16.12999916,0.00000000,0.00000000,270.00000000); //object(electricgate) (1)
    agate2 = CreateObject(980,924.79998779,-1226.50000000,18.70000076,0.00000000,0.00000000,270.00000000); //object(airportgate) (2)
    return 1;
}

public OnFilterScriptExit()
{
    DestroyObject(agate1);
    DestroyObject(agate2);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/openagate", cmdtext, true, 10) == 0)
    {
        MoveObject(agate1, 924.79998779, -1212, 16.12999916, 1);
        SendClientMessage(playerid, COLOR_BLUE, "The Admin Gate Is Now Opening...");
        return 1;
    }
    if (strcmp("/closeagate", cmdtext, true, 10) == 0)
    {
        MoveObject(agate2, 924.79998779, -1226.50000000, 18.70000076, 1.00);
        SendClientMessage(playerid, COLOR_BLUE, "The Admin Gate Is Now Closing...");
        return 1;
    }
    return 0;
}
Reply
#3

Thanks man, do you have time for a maybe bigger script xD
im stuck in that one to.

Reply
#4

Post it and we will see!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)