undefined symbol "RotX"
#1

When i am trying to compile this im getting this:

pawn Код:
#include <a_samp> // As usual, add this include to the top so your script will work.

new gate; // The objectid your gate will be using
new timer[MAX_PLAYERS]; // Creates your auto-closing timer
//Add these two ABOVE your OnFilterScriptInit() or OnGameModeInit()

public OnFilterScriptInit() // or OnGameModeInit() if you are using a gamemode
{
    gate = CreateObject(980,2220.8000500,-18.5000000,28.2000000,0.0000000,0.0000000,40.00000); //object(airportgate) (1)
    // Place this under OnFilterScriptInit(), or OnGameModeInit() if you are using it in a gamemode.
}

public OnPlayerCommandText(playerid, cmdtext[]) // This is where we make the open command
{
    if (strcmp("/open", cmdtext, true, 10) == 0) // When a player types '/open'
    {
          if(IsPlayerInRangeOfPoint(playerid, 15, 2220.8000500,-18.5000000,28.2000000)) // Will detect whether they are near the gate or not
           { // It is recommended you set the RangeOfPoint to the coordinates of your 'closed' gate
           MoveObject(gate, 2220.8000500,-18.5000000,28.2000000, 0.0, Float:RotX, Float:RotY, Float:RotZ);
           SendClientMessage(playerid, 0xEF994300, "The gate is opening and will close in 10 seconds."); // Send the player that typed /open, this message
           timer[playerid] = SetTimerEx("gateclose",10000,false,"i",playerid); // Will activate a timer called 'gateclose' after 10 seconds, once the player has typed 'open'. Does not repeat itself.
           // If you want to change timer: 1 Second = 1000, 5 seconds = 5000, 40 seconds = 40000, 1 minute = 60000 etc.
          }
    }
    return 1;
}

forward gateclose(); //Defines our 'gateclose' timer when a player types /open, and what we want the gate to do
public gateclose()
{
      MoveObject(gate, 2220.8000500,-18.5000000,28.2000000, 5.0, Float:RotX, Float:RotY, Float:RotZ);
      // which will be the same as the position in your FilterScriptInit()
}
I am getting this error:

pawn Код:
C:\Users\Jovanovski\Desktop\Balkan Extazy v2.5.0 by Lukenzi\filterscripts\base.pwn(19) : error 017: undefined symbol "RotX"
C:\Users\Jovanovski\Desktop\Balkan Extazy v2.5.0 by Lukenzi\filterscripts\base.pwn(31) : error 017: undefined symbol "RotX"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors

help me please !
Reply
#2

pawn Код:
new RotX, RotY, RotZ;
Reply
#3

I've done that and later when i run the game mod i can't use commands :///
Reply
#4

pawn Код:
return 0;
Replace this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) // This is where we make the open command
{
    if (strcmp("/open", cmdtext, true, 10) == 0) // When a player types '/open'
    {
          if(IsPlayerInRangeOfPoint(playerid, 15, 2220.8000500,-18.5000000,28.2000000)) // Will detect whether they are near the gate or not
           { // It is recommended you set the RangeOfPoint to the coordinates of your 'closed' gate
           MoveObject(gate, 2220.8000500,-18.5000000,28.2000000, 0.0, Float:RotX, Float:RotY, Float:RotZ);
           SendClientMessage(playerid, 0xEF994300, "The gate is opening and will close in 10 seconds."); // Send the player that typed /open, this message
           timer[playerid] = SetTimerEx("gateclose",10000,false,"i",playerid); // Will activate a timer called 'gateclose' after 10 seconds, once the player has typed 'open'. Does not repeat itself.
           // If you want to change timer: 1 Second = 1000, 5 seconds = 5000, 40 seconds = 40000, 1 minute = 60000 etc.
          }
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)