06.10.2013, 22:45
I have this NPC mode here, and each time I try to compile it, it gives me these errors.
LINE 46:
I have updated a_npc to the latest version.
Код:
C:\Users\Scoot\Desktop\gecko\npcmodes\AndreBus.pwn(46) : error 029: invalid expression, assumed zero C:\Users\Scoot\Desktop\gecko\npcmodes\AndreBus.pwn(46) : error 017: undefined symbol "OnRecordingPlaybackEnd" C:\Users\Scoot\Desktop\gecko\npcmodes\AndreBus.pwn(46) : error 017: undefined symbol "StartRecordingPlayback" C:\Users\Scoot\Desktop\gecko\npcmodes\AndreBus.pwn(46) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
Код:
#define FILTERSCRIPT #include <a_samp> #include <a_npc> #define RECORDING "AndreBus" //This is the filename of your recording without the extension. #define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot. new AndreBus; public OnFilterScriptInit() { print("\n--------------------------------------"); print(" AndreBus by Gecko"); print("--------------------------------------\n"); print("AndreBus Loaded!"); ConnectNPC("Andre_Bus","AndreBus"); AndreBus = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); return 1; } public OnFilterScriptExit() { return 1; } 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 } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC. { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name. if(!strcmp(npcname, "Andre_Mitchell", true)) //Checking if the NPC's name is MyFirstNPC { PutPlayerInVehicle(playerid, AndreBus, 0); //Putting the NPC into the vehicle we created for it. } return 1; } //Other stuff for normal players goes here! return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; }