Probles with bots help I'm stuck for ages... I'm an NPC bot lover lol
#1

As you download your sa-mp 0.3a server, you get bot scripts.
But they doesn't work

I don't know what to do, I just followed a tutorial which said I need to make a new pwn file.
I have but with warnings and errors and I don't understand the errors and warnings AT ALL. (except for the loose indentitation lol)

This is the pawn code:
pawn Код:
#include <a_npc>
#define NUM_PLAYBACK_FILES 5
new gPlaybackFileCycle=1;

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

main(){}

public OnNPCConnect(myplayerid)
{
    NextPlayback();
    return 1;
}

NextPlayback()
{
        StartRecordingPlayback(PLAYER_RECORDING_TYPE_ONFOOT,"train_sf_to_lv1");



        gPlaybackFileCycle++;
}

public OnRecordingPlaybackEnd()
{
    NextPlayback();
    NextPlayback()
{
                    if(gPlaybackFileCycle = 0){
        StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"train_sf_to_lv1");
                    }
                    if(gPlaybackFileCycle = 1){
        StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"train_sf_to_lv1");
                    }


        gPlaybackFileCycle++;
}
}

public OnRecordingPlaybackEnd()
{
    if(gPlaybackFileCycle = 1){
    gPlaybackFileCycle = 1000;
    }
    if(gPlaybackFileCycle = 1){
    gPlaybackFileCycle = 1;
    NextPlayback();
    }
    if(gPlaybackFileCycle = 1000){
    gPlaybackFileCycle = 1;
    NextPlayback();
    }
}
Код:
The errors and warnings:
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(28) : error 001: expected token: ";", but found "{"
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(28) : warning 217: loose indentation
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(29) : warning 211: possibly unintended assignment
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(32) : warning 211: possibly unintended assignment
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(37) : warning 217: loose indentation
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(42) : error 021: symbol already defined: "OnRecordingPlaybackEnd"
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(43) : warning 211: possibly unintended assignment
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(46) : warning 211: possibly unintended assignment
C:\spellen\GTA Games\Sa-mp 0.3\sa-mp 0.3a\npcmodes\NPC_work.pwn(50) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Can you help please? I want some NPC bot fun!
Reply
#2

Whats standing on rule number 28?
Reply
#3

Quote:
Originally Posted by GangMember211
Whats standing on rule number 28?
NextPlayback()

and that must be

NextPlayback();

edit fixed whole thing (wild edit)

pawn Код:
#include <a_npc>
#define NUM_PLAYBACK_FILES 5
new gPlaybackFileCycle=1;

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

main(){}

public OnNPCConnect(myplayerid)
{
    NextPlayback();
    return 1;
}

NextPlayback()
{
        StartRecordingPlayback(PLAYER_RECORDING_TYPE_ONFOOT,"train_sf_to_lv1");



        gPlaybackFileCycle++;
}

public OnRecordingPlaybackEnd()
{
    NextPlayback();
    NextPlayback();
                    if(gPlaybackFileCycle = 0) {
        StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"train_sf_to_lv1");
                    }
                    if(gPlaybackFileCycle = 1) {
        StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"train_sf_to_lv1");
                    }


        gPlaybackFileCycle++;
 return 1;
}

public OnRecordingPlaybackEnd()
{
    if(gPlaybackFileCycle = 1){
    gPlaybackFileCycle = 1000;
    }
    if(gPlaybackFileCycle = 1){
    gPlaybackFileCycle = 1;
    NextPlayback();
    }
    if(gPlaybackFileCycle = 1000){
    gPlaybackFileCycle = 1;
    NextPlayback();
    }
 return 1;
}
Search for the callback 'OnRecordingPlaybackEnd' and remove it (the unused one)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)