Pawno Problem with NPC
#1

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xAA3333AA

#include <a_samp>


#if defined FILTERSCRIPT
new MyFirstNPCVehicle;
new Text3D:Botinfo;
public OnFilterScriptInit()
{
   print("Bus v0.1");
   ConnectNPC("Dancho""Bus"); // Line 16
   MyFirstNPCVehicle = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
   Botinfo = Create3DTextLabel("Red Couty Bus",COLOR_LIGHTBLUE,0.0,0.0,0.0,30.0,0);
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) // Line 39
        {
        new npcname [MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        SetPlayerSkin(playerid, 256);
        if(!strcmp(npcname, "Dancho",true))
        {
        PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
        SetPlayerColor(playerid,0xFFFFFFF);
        }
        if(!strcmp(npcname, "Dancho",true))
        {
        Attach3DTextLabelToPlayer(Botinfo, playerid, 0.0,0.0,0.0);
        }
        return false;
        }
pawn Код:
C:\Users\2com\Desktop\bus.pwn(16) : warning 202: number of arguments does not match definition
C:\Users\2com\Desktop\bus.pwn(55) : error 030: compound statement not closed at the end of file (started at line 39)
Please help me to fix it
Reply
#2

How they should be?
Reply
#3

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xAA3333AA

#include <a_samp>


#if defined FILTERSCRIPT
new MyFirstNPCVehicle;
new Text3D:Botinfo;
public OnFilterScriptInit()
{
    print("Bus v0.1");
    ConnectNPC("Dancho", "Bus"); // You forgot a "," between
    MyFirstNPCVehicle = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
    Botinfo = Create3DTextLabel("Red Couty Bus",COLOR_LIGHTBLUE,0.0,0.0,0.0,30.0,0);
}

public OnFilterScriptExit()
{
    return 1;
}

#else
   
main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) // Line 39
    {
        new npcname [MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        SetPlayerSkin(playerid, 256);
        if(!strcmp(npcname, "Dancho",true))
        {
            PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
            SetPlayerColor(playerid,0xFFFFFFF);
        }
        if(!strcmp(npcname, "Dancho",true))
        {
            Attach3DTextLabelToPlayer(Botinfo, playerid, 0.0,0.0,0.0);
        }
        return false;
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)