Errors and warnings
#1

I'm new at scripting so if anyone can help me with these errors&warnings:

Код:
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(116) : warning 217: loose indentation
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(116) : error 029: invalid expression, assumed zero
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(116) : error 004: function "OnDialogResponse" is not implemented
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(119) : error 017: undefined symbol "dialogid"
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(121) : error 017: undefined symbol "response"
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(123) : error 017: undefined symbol "listitem"
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(130) : error 017: undefined symbol "listitem"
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(137) : error 017: undefined symbol "listitem"
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(148) : warning 217: loose indentation
C:\Users\Marko\Desktop\trucking\filterscripts\Kiosk.pwn(150) : error 030: compound statement not closed at the end of file (started at line 84)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
here is the script:
pawn Код:
#include <a_samp>

#define COLOR_RED 0xFF0000FF


new KK1;
new KK2;
new KK3;
new KK4;
new KK5;
new KK6;
new KK7;
new KK8;
new KK9;
new KK10;
new KK11;
new KK12;
new KK13;
new KK14;

public OnFilterScriptInit()
{

    KK1 = CreatePickup(1239, 1, 2082.6, 987.6, 10.8, -1);
    KK2 = CreatePickup(1239, 1, 1914.8, 2226.0, 10.8, -1);
    KK3 = CreatePickup(1239, 1, -150.7, 1220.3, 19.9, -1);
    KK4 = CreatePickup(1239, 1, -262.0, 2610.3, 62.8, -1);
    KK5 = CreatePickup(1239, 1, -1274.6, 2708.8, 50.0, -1);
    KK6 = CreatePickup(1239, 1, -2442.1, 2323.8, 4.9, -1);
    KK7 = CreatePickup(1239, 1, 2226.4, -1742.3, 13.5, -1);
    KK8 = CreatePickup(1239, 1, 1948.6, -2102.0, 13.5, -1);
    KK9 = CreatePickup(1239, 1, 1513.4, -1614.5, 14.0, -1);
    KK10 = CreatePickup(1239, 1, 358.2, -1736.8, 6.1, -1);
    KK11 = CreatePickup(1239, 1, -1580.9, 1217.8, 7.1, -1);
    KK12 = CreatePickup(1239, 1, -1988.7, 884.6, 45.2, -1);
    KK13 = CreatePickup(1239, 1, -1994.7, 206.8, 27.6, -1);
    KK14 = CreatePickup(1239, 1, -2166.8, -2407.6, 30.6, -1);
   
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 2082.6, 987.6, 10.8, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 1914.8, 2226.0, 10.8, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -150.7, 1220.3, 19.9, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -262.0, 2610.3, 62.8, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -1274.6, 2708.8, 50.0, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -2442.1, 2323.8, 4.9, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 2226.4, -1742.3, 13.5, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 1948.6, -2102.0, 13.5, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 1513.4, -1614.5, 14.0, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 358.2, -1736.8, 6.1, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -1580.9, 1217.8, 7.1, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -1988.7, 884.6, 45.2, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -1994.7, 206.8, 27.6, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -2166.8, -2407.6, 30.6, 20.0, 0, 0);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == KK1)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK2)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK3)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    if(pickupid == KK4)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK5)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK6)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    if(pickupid == KK7)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK8)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK9)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    if(pickupid == KK10)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK11)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK12)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    if(pickupid == KK13)
    {
    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK14)
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

    if(dialogid == 25)
    {
    if(response)
    {
    if(listitem == 0)
    {
    if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "{FF0000}You don't have enough cash to purchase this item!");
    GivePlayerWeapon(playerid, 46, 1);
    GivePlayerMoney(playerid, - 500);
    SendClientMessage(playerid, COLOR_RED, "{00FF00}You Have Bought {FFCC00}Parachute.");
    }
    if(listitem == 1)
    {
    if(GetPlayerMoney(playerid) < 700) return SendClientMessage(playerid, COLOR_RED, "{FF0000}You don't have enough cash to purchase this item!");
    GivePlayerWeapon(playerid, 25, 99999);
    GivePlayerMoney(playerid, - 700);
    SendClientMessage(playerid, COLOR_RED, "{00FF00}You Have Bought {FFCC00}Camera.");
    }
    if(listitem == 2)
    {
    if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COLOR_RED, "{FF0000}You don't have enough cash to purchase this item!");
    GivePlayerWeapon(playerid, 30, 99999);
    GivePlayerMoney(playerid, - 1500);
    SendClientMessage(playerid, COLOR_RED, "{00FF00}You Have Bought {FFCC00}SprayCan.");
    }
 
}
}
}
    return 1;
}


Thx!
Reply
#2

pawn Код:
#include <a_samp>

#define COLOR_RED 0xFF0000FF


new KK1;
new KK2;
new KK3;
new KK4;
new KK5;
new KK6;
new KK7;
new KK8;
new KK9;
new KK10;
new KK11;
new KK12;
new KK13;
new KK14;

public OnFilterScriptInit()
{

    KK1 = CreatePickup(1239, 1, 2082.6, 987.6, 10.8, -1);
    KK2 = CreatePickup(1239, 1, 1914.8, 2226.0, 10.8, -1);
    KK3 = CreatePickup(1239, 1, -150.7, 1220.3, 19.9, -1);
    KK4 = CreatePickup(1239, 1, -262.0, 2610.3, 62.8, -1);
    KK5 = CreatePickup(1239, 1, -1274.6, 2708.8, 50.0, -1);
    KK6 = CreatePickup(1239, 1, -2442.1, 2323.8, 4.9, -1);
    KK7 = CreatePickup(1239, 1, 2226.4, -1742.3, 13.5, -1);
    KK8 = CreatePickup(1239, 1, 1948.6, -2102.0, 13.5, -1);
    KK9 = CreatePickup(1239, 1, 1513.4, -1614.5, 14.0, -1);
    KK10 = CreatePickup(1239, 1, 358.2, -1736.8, 6.1, -1);
    KK11 = CreatePickup(1239, 1, -1580.9, 1217.8, 7.1, -1);
    KK12 = CreatePickup(1239, 1, -1988.7, 884.6, 45.2, -1);
    KK13 = CreatePickup(1239, 1, -1994.7, 206.8, 27.6, -1);
    KK14 = CreatePickup(1239, 1, -2166.8, -2407.6, 30.6, -1);

    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 2082.6, 987.6, 10.8, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 1914.8, 2226.0, 10.8, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -150.7, 1220.3, 19.9, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -262.0, 2610.3, 62.8, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -1274.6, 2708.8, 50.0, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -2442.1, 2323.8, 4.9, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 2226.4, -1742.3, 13.5, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 1948.6, -2102.0, 13.5, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 1513.4, -1614.5, 14.0, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, 358.2, -1736.8, 6.1, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -1580.9, 1217.8, 7.1, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -1988.7, 884.6, 45.2, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -1994.7, 206.8, 27.6, 20.0, 0, 0);
    Create3DTextLabel("{FFFF00}Kiosk", 0x008080FF, -2166.8, -2407.6, 30.6, 20.0, 0, 0);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == KK1)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK2)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK3)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK4)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK5)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK6)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK7)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK8)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK9)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK10)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK11)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK12)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK13)
    {
        ShowPlayerDialog(playerid, 25, DIALOG_STYLE_LIST, "Kiosk", "{00FFFF}Parachute   {FFFFFF}500$\n{00FFFF}Camera    {FFFFFF}700$\n{FFFFFF}SprayCan  {00FFFF}1500$\n", "Buy", "Leave");
    }
    if(pickupid == KK14)
    {
   
    }
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 25)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "{FF0000}You don't have enough cash to purchase this item!");
                GivePlayerWeapon(playerid, 46, 1);
                GivePlayerMoney(playerid, - 500);
                SendClientMessage(playerid, COLOR_RED, "{00FF00}You Have Bought {FFCC00}Parachute.");
            }
            if(listitem == 1)
            {
                if(GetPlayerMoney(playerid) < 700) return SendClientMessage(playerid, COLOR_RED, "{FF0000}You don't have enough cash to purchase this item!");
                GivePlayerWeapon(playerid, 25, 99999);
                GivePlayerMoney(playerid, - 700);
                SendClientMessage(playerid, COLOR_RED, "{00FF00}You Have Bought {FFCC00}Camera.");
            }
            if(listitem == 2)
            {
                if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COLOR_RED, "{FF0000}You don't have enough cash to purchase this item!");
                GivePlayerWeapon(playerid, 30, 99999);
                GivePlayerMoney(playerid, - 1500);
                SendClientMessage(playerid, COLOR_RED, "{00FF00}You Have Bought {FFCC00}SprayCan.");
            }
        }
    }
    return 1;
}
Reply
#3

workss,yay +rep thank you
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)