Attempting to script my own house
#9

Ok, i found interior i wanted, Large modern unused Safehouse, but still get errors

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

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("Admin Crib Loaded");
    return 1;
}

// -----------------------------------------------------------------------------

public OnFilterScriptExit()
{
    print("Admin Crib Unloaded");
    return 1;
}

// -----------------------------------------------------------------------------

#else

// -----------------------------------------------------------------------------

#endif

// -----------------------------------------------------------------------------

public OnGameModeInit()
{
  DisableInteriorEnterExits();
  CreatePickup(1239,1,2049.48,2763.07,10.82); // Icon
    return 1;
}

// -----------------------------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/enter",cmdtext,true,6) == 0)
    {
        if(PlayerToPoint(3,playerid,2049.48,2763.07,10.82)) // House Entramce
        {
          SetPlayerInterior(playerid, 12); // Sets Player to Interior 12
          SetPlayerPos(playerid, 2324.4199,-1145.5699,1050.7101); // Spawn position inside
          return 1;
        }
        return 1;
    }
    if (strcmp("/exit",cmdtext,true,5) == 0)
    {
        if(PlayerToPoint(3,playerid,2049.48,2763.07,10.82)) // House Entrance
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 2290.0496,2430.2283,10.8203); // this is where player will stand...
        return 1;
      }
        return 1;
}

// -----------------------------------------------------------------------------

stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
  new Float:oldposx, Float:oldposy, Float:oldposz;
  new Float:tempposx, Float:tempposy, Float:tempposz;
  GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  tempposx = (oldposx -x);
  tempposy = (oldposy -y);
  tempposz = (oldposz -z);
  if (((tempposx < 3) && (tempposx > -3)) && ((tempposy < 3) && (tempposy > -3)) && ((tempposz < 3) && (tempposz > -3)))
  {
    return 1;
  }
  return 0;
}
Errors:

Код:
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(43) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(53) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(64) : warning 217: loose indentation
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(64) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(64) : error 017: undefined symbol "radi"
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(69) : error 017: undefined symbol "x"
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(70) : error 017: undefined symbol "y"
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(71) : error 017: undefined symbol "z"
C:\Documents and Settings\Mitch\Desktop\SERVER\filterscripts\AdminCrib.pwn(78) : error 030: compound statement not closed at the end of file (started at line 41)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply


Messages In This Thread
Attempting to script my own house - by Mr. M - 07.02.2009, 12:23
Re: Attempting to script my own house - by Sandra18[NL] - 07.02.2009, 12:41
Re: Attempting to script my own house - by Mr. M - 07.02.2009, 12:48
Re: Attempting to script my own house - by pspleo - 07.02.2009, 12:55
Re: Attempting to script my own house - by Mr. M - 07.02.2009, 13:05
Re: Attempting to script my own house - by Auto-Sized - 07.02.2009, 14:28
Re: Attempting to script my own house - by Mr. M - 07.02.2009, 17:33
Re: Attempting to script my own house - by Auto-Sized - 07.02.2009, 20:32
Re: Attempting to script my own house - by Mr. M - 07.02.2009, 20:38
Re: Attempting to script my own house - by Auto-Sized - 07.02.2009, 22:24

Forum Jump:


Users browsing this thread: 2 Guest(s)