#1

Код:
C:\Users\ania\Documents\New Folder\samp03x_svr_R1-2_win32\filterscripts\Untitled.pwn(16) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
WTF? HERE IS MY CMD

Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext, "/myhouse") == 0)
     {
         SetPlayerPos(playerid,-851.3694,64.3361,86.8685);
         return 1;
     }
     return 0;
}
Reply
#2

HELP PLZZZ
Reply
#3

Use, #endif at the end of the script
Reply
#4

explain more plz?
Reply
#5

Your script contains an "#if defined" statement. If you have read the wiki/pawn language guide, you'd have known that an "#if defined" statement has to be closed with an "#endif" statement. The compiler tells you that it can't find this statement. What more is there to explain?
Reply
#6

You do not need the following line:
pawn Код:
#if defined FILTERSCRIPT
This definition is used basically for external scripts to check whether or not the current script is filterscript or not. You never define FILTERSCRIPT, so this is useless. Furthermore, you never even use the OnFilterScriptInit/Exit callbacks.
Reply
#7

pawn Код:
// Try this one, normaly it's work.

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/myhouse", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid,-851.3694,64.3361,86.8685);
        return 1;
    }
    return 0;
}
Reply
#8

You should try this:

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
      if(strcmp("/myhouse", cmdtext, true, 10) == 0)
      {
          SetPlayerPos(playerid,-851.3694,64.3361,86.8685);
          return 1;
      }
      return 0;
}
Reply
#9

pawn Код:
#include <a_samp>
#define FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
      if(strcmp("/myhouse", cmdtext, true, 10) == 0)
      {
          SetPlayerPos(playerid,-851.3694,64.3361,86.8685);
          return 1;
      }
      return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)