Pawn Compiling errors, Errors and Line are inside [ +REP ]
#1

Hello,
I was compiling my gamemode and it gave me these errors :
Code:
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(76) : error 021: symbol already defined: "Time"
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(198) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(199) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(582) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(583) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(584) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(585) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(586) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(587) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(588) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(589) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


11 Errors.
These are the lines :
Lines #70 - #80 :
Code:
	new String[32];
    format(String,sizeof(String),"%s",VehicleNames[GetVehicleModel(vehicleid) - 400]);
    return String;
}


new Text:Time;
new Text:Time_Lib;

new Text:FM_LOGO[MAX_PLAYERS];
new Text:Player_Board[MAX_PLAYERS];
Lines #190 - #200 :
Code:
	
	new HOUR[8], MINUTE[8];
    if(SvrHour   < 10){format(HOUR  , sizeof(HOUR), "0%i", SvrHour  );}else{format(HOUR  , sizeof(HOUR), "%i", SvrHour);}
    if(SvrMinute < 10){format(MINUTE, sizeof(MINUTE), "0%i", SvrMinute);}else{format(MINUTE, sizeof(MINUTE), "%i", SvrMinute);}

    
    format(C_HOUR, sizeof(C_HOUR), "%s:%s", HOUR, MINUTE);
    
    TextDrawSetString(Time, C_HOUR);
	TextDrawShowForAll(Time);
Lines #580 - #590 :
Code:
	Time = TextDrawCreate(556.000000, 31.000000, C_HOUR);
	TextDrawBackgroundColor(Time, 255);
	TextDrawFont(Time, 3);
	TextDrawLetterSize(Time, 0.439999, 1.399999);
	TextDrawColor(Time, -1);
	TextDrawSetOutline(Time, 0);
	TextDrawSetProportional(Time, 1);
	TextDrawSetShadow(Time, 1);
	

	Time_Lib = TextDrawCreate(546.000000, 23.000000, "Time :");
	TextDrawBackgroundColor(Time_Lib, 255);
	TextDrawFont(Time_Lib, 1);
	TextDrawLetterSize(Time_Lib, 0.280000, 1.099998);
	TextDrawColor(Time_Lib, -1);
	TextDrawSetOutline(Time_Lib, 0);
	TextDrawSetProportional(Time_Lib, 1);
	TextDrawSetShadow(Time_Lib, 1);
Please helpme , I will give you +REP!
Reply
#2

Can you put the codes in [pawn] tags, and comment out where the lines exactly are? As for the "Time" issue, that means that you have new Time; defined before that line. it looks to me that that is most likely the only issue here.
Reply
#3

pawn Code:
70  new String[32];
71    format(String,sizeof(String),"%s",VehicleNames[GetVehicleModel(vehicleid) - 400]);
72    return String;
73}
74
75
76     new Text:Time;
77     new Text:Time_Lib;
78
79     new Text:FM_LOGO[MAX_PLAYERS];
80      new Text:Player_Board[MAX_PLAYERS];
pawn Code:
190 new HOUR[8], MINUTE[8];
191    if(SvrHour   < 10){format(HOUR  , sizeof(HOUR), "0%i", SvrHour  );}else{format(HOUR  , sizeof(HOUR), 192"%i", SvrHour);}
193    if(SvrMinute < 10){format(MINUTE, sizeof(MINUTE), "0%i", SvrMinute);}else{format(MINUTE, 194sizeof(MINUTE), "%i", SvrMinute);}
195
196    
197    format(C_HOUR, sizeof(C_HOUR), "%s:%s", HOUR, MINUTE);
198    
199    TextDrawSetString(Time, C_HOUR);
200 TextDrawShowForAll(Time);
pawn Code:
580 Time = TextDrawCreate(556.000000, 31.000000, C_HOUR);
581 TextDrawBackgroundColor(Time, 255);
582 TextDrawFont(Time, 3);
583 TextDrawLetterSize(Time, 0.439999, 1.399999);
584 TextDrawColor(Time, -1);
585 TextDrawSetOutline(Time, 0);
586 TextDrawSetProportional(Time, 1);
587 TextDrawSetShadow(Time, 1);
588
589
590 Time_Lib = TextDrawCreate(546.000000, 23.000000, "Time :");
591 TextDrawBackgroundColor(Time_Lib, 255);
592 TextDrawFont(Time_Lib, 1);
593 TextDrawLetterSize(Time_Lib, 0.280000, 1.099998);
594 TextDrawColor(Time_Lib, -1);
595 TextDrawSetOutline(Time_Lib, 0);
596 TextDrawSetProportional(Time_Lib, 1);
597 TextDrawSetShadow(Time_Lib, 1);
Reply
#4

Okay, the thing that is causing all of those errors is that you have somewhere between line 1 and 76 defined the variable "time" already.
Reply
#5

These are all the lines from #1 till #76
pawn Code:
#include <a_samp>
#include <dini>

#define INFINITE_HEALTH (Float:99999999999999999999999999999.0)

new VehicleNames[][] =
{
    "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
    "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
    "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
    "Esperanto", "Taxi", "Washington", "Bobcat", "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", "ZR-350", "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", "Cropduster", "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", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
    "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
    "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
    "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
    "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
    "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
    "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
    "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
    "Tiller", "Utility Trailer"
};

new PLAYERSCOLORS[][] =
{
    0xFFFFFFFF, //White

    0x3C3CFFFF, //Police
    0xFF3C3CFF, //Terrorists

    0xFAEE05FF, //Yellow
    0x4ED60CFF, //Green

    0xC3C3C3FF  //White
};

new PLAYERSCOLORSD[][] =
{
    "FFFFFF", //White

    "3C3CFF", //Police
    "FF3C3C", //Terrorists

    "FAEE05", //Yellow
    "4ED60C", //Green

    "C3C3C3"  //White
};

stock GetVehicleName(vehicleid)
{
    new String[32];
    format(String,sizeof(String),"%s",VehicleNames[GetVehicleModel(vehicleid) - 400]);
    return String;
}


new Text:Time;
Reply
#6

Hmm, try renaming the textdraw to something else, like Time1
Reply
#7

again errors :
Code:
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(198) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(199) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(582) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(583) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(584) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(585) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(586) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(587) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(588) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(589) : error 076: syntax error in the expression, or invalid function call
C:\Users\User\Desktop\DC\gamemodes\DC.pwn(1409) : warning 203: symbol is never used: "Time1"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Errors.
Reply
#8

You have to rename all the textdraw stuff from "Time" to "Time1" as well.
Reply
#9

It worked Thanks ! +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)