Please Help me
#1

Hello
I need a help with a speed meter
if you guys can fix it so please pm me i can send my Pawno.. for Fix it.
see :
Код:
E:\FLY.pwn(267) : error 021: symbol already defined: "Textdraw0"
E:\FLY.pwn(268) : error 021: symbol already defined: "Textdraw1"
E:\FLY.pwn(4188) : error 028: invalid subscript (not an array or too many subscripts): "Textdraw1"
E:\FLY.pwn(4188) : warning 215: expression has no effect
E:\FLY.pwn(4188) : error 001: expected token: ";", but found "]"
E:\FLY.pwn(4188) : error 029: invalid expression, assumed zero
E:\FLY.pwn(4188) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Help me i can't Fix it.
Reply
#2

Can you show us your code ?
Reply
#3

You have defined Textdraw0 & Textdraw1 twice.

Just remove this from the script

pawn Код:
new Text:Textdraw0;
new Text:Textdraw1;
Reply
#4

i am use other guy speed meter he is :Littlehelper[MDZ]
Here is Code:
Код:
#include <a_samp>

new Text:Textdraw0;
new Text:Textdraw1;

new Float:Velocity [3];

new Vehicles[][] ={
"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster",
"Stretch","Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto",
"Taxi","Washington","Bobcat","Mr Whoopee","BF Injection","Hunter","Premier","Enforcer","Securicar","Banshee",
"Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo",
"RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer",
"Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer",
"PCJ-600","Faggio","Freeway","RC Baron","RC Raider","Glendale","Oceanic","Sanchez","Sparrow","Patriot",
"Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina","Comet","BMX",
"Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo",
"Greenwood","Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa",
"RC Goblin","Hotring Racer A","Hotring Racer B","Bloodring Banger","Rancher","Super GT","Elegant",
"Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain","Nebula","Majestic",
"Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona",
"FBI Truck","Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight",
"Streak","Vortex","Vincent","Bullet","Clover","Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob",
"Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A","Monster B","Uranus",
"Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight",
"Trailer","Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford",
"BF-400","Newsvan","Tug","Trailer A","Emperor","Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C",
"Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)","Police Car (LVPD)","Police Ranger",
"Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
"Stair Trailer","Boxville","Farm Plow","Utility Trailer" };

public OnFilterScriptInit()
{
    print("Speedo-Meter By Littlehelper AKA iKing");

    Textdraw0 = TextDrawCreate(39.000000, 134.000000, "Vehicle: Loading");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
    TextDrawColor(Textdraw0, 16711935);
    TextDrawSetOutline(Textdraw0, 1);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 255);
    TextDrawTextSize(Textdraw0, 187.000000, 549.000000);

    Textdraw1 = TextDrawCreate(39.000000, 149.000000, "Velocity: Loading");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 1);
    TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
    TextDrawColor(Textdraw1, 16711935);
    TextDrawSetOutline(Textdraw1, 1);
    TextDrawSetProportional(Textdraw1, 1);
    TextDrawUseBox(Textdraw1, 1);
    TextDrawBoxColor(Textdraw1, -1);
    TextDrawTextSize(Textdraw1, 187.000000, 272.000000);
    SetTimer("Speed", 1000, true);
    return 1;
}

public OnFilterScriptExit()
{
    TextDrawHideForAll(Textdraw0);
    TextDrawDestroy(Textdraw0);
    TextDrawHideForAll(Textdraw1);
    TextDrawDestroy(Textdraw1);
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        Speed(playerid);
    }
    else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        TextDrawHideForPlayer(playerid, Textdraw0);
        TextDrawHideForPlayer(playerid, Textdraw1);
    }
    return 1;
}
forward Speed(playerid);
public Speed(playerid)
{
    new MySpeed[48];
    new MyCar[48];
    format(MySpeed,sizeof(MySpeed),"Velocity: %d Km/h",GetSpeed(playerid));
    format(MyCar,sizeof(MyCar),"Vehicle: %s",Vehicles[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
    TextDrawSetString(Textdraw1, MySpeed);
    TextDrawSetString(Textdraw0, MyCar);
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);

    return 1;
}
// Credits To SlashPT For GetsSpeed Stock.
stock
    GetSpeed ( playerid , mode = 1 )
{
    GetVehicleVelocity ( GetPlayerVehicleID ( playerid ) , Velocity [ 0 ] , Velocity [ 1 ] , Velocity [ 2 ] ) ;
    return IsPlayerInAnyVehicle ( playerid ) ? floatround ( ( ( floatsqroot ( ( ( Velocity [ 0 ] * Velocity [ 0 ] ) + ( Velocity [ 1 ] * Velocity [ 1 ] ) + ( Velocity [ 2 ] * Velocity [ 2 ] ) ) ) * ( !mode ? 105.0 : 170.0 ) ) ) * 1 ) : 0;
}
Reply
#5

It is compiled successfully.
Reply
#6

Its Fs So Put It On Filterscript line its not necessary to put it on gm
Reply
#7

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
It is compiled successfully.
you see no error?
but i see 6error
Код:
E:\FLY.pwn(265) : error 021: symbol already defined: "Textdraw0"
E:\FLY.pwn(266) : error 021: symbol already defined: "Textdraw1"
E:\FLY.pwn(4186) : error 028: invalid subscript (not an array or too many subscripts): "Textdraw1"
E:\FLY.pwn(4186) : warning 215: expression has no effect
E:\FLY.pwn(4186) : error 001: expected token: ";", but found "]"
E:\FLY.pwn(4186) : error 029: invalid expression, assumed zero
E:\FLY.pwn(4186) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#8

You are using it as a filterscript or you installed it in the gamemode?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)