[ajuda] erro no UNP
#1

pawn Код:
#define RECORDING "meunpc" //Este й o nome do seu arquivo de gravaзгo, sem a extenзгo(.rec).
#define RECORDING_TYPE 1 //1 para gravaзхes em veнculo e 2 para gravaзхes apй.
#define ConnectNPC
#define CreateVehicle
#define IsPlayerNPC
#define PutPlayerInVehicle

//==================================================================================//
forward OnFilterScriptInit();
forward OnPlayerSpawn();

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif


new MeuPrimeiroNPCVehicle; //Variavel global

public OnFilterScriptInit()
{
  print("meu filterscript");
  ConnectNPC("MeuPrimeiroNPC","meunpc");
  MeuPrimeiroNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
  return 1;
}

public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Verifica se o jogador й um NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s).
    if(!strcmp(npcname, "MeuPrimeiroNPC", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
    {
      PutPlayerInVehicle(playerid, MeuPrimeiroNPCVehicle, 0); //Colocar o NPC dentro do veнculo que criamos para isso.
    }
    return 1;
  }
}
aki os erros
pawn Код:
C:\Documents and Settings\Vinicius\Desktop\bot.pwn(29) : warning 215: expression has no effect
C:\Documents and Settings\Vinicius\Desktop\bot.pwn(34) : error 025: function heading differs from prototype
C:\Documents and Settings\Vinicius\Desktop\bot.pwn(42) : warning 215: expression has no effect
C:\Documents and Settings\Vinicius\Desktop\bot.pwn(46) : warning 209: function "OnPlayerSpawn" should return a value
C:\Documents and Settings\Vinicius\Desktop\bot.pwn(30) : warning 204: symbol is assigned a value that is never used: "MeuPrimeiroNPCVehicle"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)