// INCLUDES // #include <a_samp> // COLORS // #define COLOR_BASIC 0x0066FFAA #define COLOR_RED 0xFF0000FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA ////////////////////Car Prices/////////////////// //INSTRUCTIONS: // Change the 0 to amounce you want the cars to be sold //V = Car Price //A =Cars Amount On Buy //Off Road #define VBandito 10 #define ABandito 1 #define VBFInjection 122 #define ABFInjection 1 #define VDune 122 #define ADune 1 #define VMesa 956 #define AMesa 1 //Sports Cars #define VBanshee 66 #define ABanshee 1 #define VBuffalo 88 #define ABuffalo 1 #define VInfernus 99 #define AInfernus 1 //Bikes #define VBMX 10 #define ABMX 1 #define VQuad 30 #define AQuad 1 public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/Carshop", cmdtext, true, 11) == 0) { ShowPlayerDialog(playerid, 20320, DIALOG_STYLE_LIST, "Car Shop", "Off Road\nSports Cars\nBikes", "Select", "Exit"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 20320 && response) { switch(listitem) { case 0: { ShowPlayerDialog(playerid, 20321, DIALOG_STYLE_LIST, "Car Shop [Off Road]", "Bandito 25000\nBF Injection 50000\nDune 1000\nMesa 2000", "Buy", "Cancel"); } case 1: { ShowPlayerDialog(playerid, 20322, DIALOG_STYLE_LIST, "Car Shop [Sports Car]", "Banshee 100\nBuffalo 5\nInfernus 500", "Buy", "Cancel"); } case 2: { ShowPlayerDialog(playerid, 20323, DIALOG_STYLE_LIST, "Car Shop [Bikes]", "BMX 5000\nQuad 1000", "Buy", "Cancel"); } } } if(dialogid == 20321 && response) { switch(listitem) { case 0: { if( GetPlayerMoney(playerid) < Bandito) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!"); GivePlayerMoney(playerid, -Bandito); GivePlayerCar(playerid, 1, Bandito); SendClientMessage(playerid, COLOR_GREEN, "Car Shop : You have succesfully bought a Bandito!"); } if( GetPlayerMoney(playerid) < BF Injection) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!"); GivePlayerMoney(playerid, -BF Injection); GivePlayerCar(playerid, 1, BF Injection); SendClientMessage(playerid, COLOR_GREEN, "Car Shop : You have succesfully bought a BF Injection!"); } } } return 1; }
C:\Users\Jot\Desktop\SAMP Server\filterscripts\CarShop.pwn(83) : error 017: undefined symbol "Bandito" C:\Users\Jot\Desktop\SAMP Server\filterscripts\CarShop.pwn(84) : error 017: undefined symbol "Bandito" C:\Users\Jot\Desktop\SAMP Server\filterscripts\CarShop.pwn(85) : error 017: undefined symbol "GivePlayerCar" C:\Users\Jot\Desktop\SAMP Server\filterscripts\CarShop.pwn(8 ![]() C:\Users\Jot\Desktop\SAMP Server\filterscripts\CarShop.pwn(8 ![]() C:\Users\Jot\Desktop\SAMP Server\filterscripts\CarShop.pwn(8 ![]() C:\Users\Jot\Desktop\SAMP Server\filterscripts\CarShop.pwn(8 ![]() Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors |
// INCLUDES //
#include <a_samp>
// COLORS //
#define COLOR_BASIC 0x0066FFAA
#define COLOR_RED 0xFF0000FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
////////////////////Car Prices///////////////////
//INSTRUCTIONS:
// Change the 0 to amounce you want the cars to be sold
//V = Car Price
//A =Cars Amount On Buy
//Off Road
#define VBandito 10
#define ABandito 1
#define VBFInjection 122
#define ABFInjection 1
#define VDune 122
#define ADune 1
#define VMesa 956
#define AMesa 1
//Sports Cars
#define VBanshee 66
#define ABanshee 1
#define VBuffalo 88
#define ABuffalo 1
#define VInfernus 99
#define AInfernus 1
//Bikes
#define VBMX 10
#define ABMX 1
#define VQuad 30
#define AQuad 1
//Variables
new Bandito;
new BFInjection;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Carshop", cmdtext, true, 11) == 0) {
ShowPlayerDialog(playerid, 20320, DIALOG_STYLE_LIST, "Car Shop", "Off Road\nSports Cars\nBikes", "Select", "Exit");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 20320 && response) {
switch(listitem) {
case 0:
{
ShowPlayerDialog(playerid, 20321, DIALOG_STYLE_LIST, "Car Shop [Off Road]", "Bandito 25000\nBF Injection 50000\nDune 1000\nMesa 2000", "Buy", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 20322, DIALOG_STYLE_LIST, "Car Shop [Sports Car]", "Banshee 100\nBuffalo 5\nInfernus 500", "Buy", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, 20323, DIALOG_STYLE_LIST, "Car Shop [Bikes]", "BMX 5000\nQuad 1000", "Buy", "Cancel");
}
}
}
if(dialogid == 20321 && response) {
switch(listitem) {
case 0:
{
if( GetPlayerMoney(playerid) < Bandito) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!");
GivePlayerMoney(playerid, -Bandito);
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
CreateVehicle(568,Float:x,Float:y,Float:z,100.0,1,1,15);
SendClientMessage(playerid, COLOR_GREEN, "Car Shop : You have succesfully bought a Bandito!");
}
case 1:
{
if( GetPlayerMoney(playerid) < BFInjection) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!");
GivePlayerMoney(playerid, -BFInjection);
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
CreateVehicle(424,Float:x,Float:y,Float:z,100.0,1,1,15);
SendClientMessage(playerid, COLOR_GREEN, "Car Shop : You have succesfully bought a BF Injection!");
}
}
}
return 1;
}
C:\Users\Jot\Desktop\SAMP Server\filterscripts\CarShop.pwn(83) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
if(blahblahblah(xx))//Good indentation
{
Player = www;
Bot = qqq;
Somebody = Something;
}
else//Bad indentation
{
Player = ppp;
Bot = 888;
Somebody = Nothing;
}
That's just a tabulation warning.
pawn Код:
|
Oh my...
You can clearly see there's extra space/tab inside else statement. The warning show up because the code isn't abreast/straight. |
// After #include < a_samp >
#pragma tabsize 0