Two errors:
#1

We're working on fixing a bug in our script, and now it won't compile. Two errors:
Код:
(40306) : error 017: undefined symbol "CreatePermanentVehicles"
(96162) : warning 204: symbol is assigned a value that is never used: "Vehicles"
LINES:

40306
Код:
dcmd_permcar(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, GREY, "    You are not authorized to use this command.");
	new model, color1, color2, faction, family, vip, Float:x, Float:y, Float:z, Float:a;
	GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a);
	if(sscanf(params, "dddddd", model, color1, color2, faction, family, vip)) return SyntaxMessage(playerid, "/permcar [model] [color 1] [color 2] [faction] [family] [VIP]");
	if(model < 400 || model > 611) return SendClientMessage(playerid, GREY, "Invalid model ID.");
	if(color1 < 0 || color1 > 255) return SendClientMessage(playerid, GREY, "Invalid color ID.");
    if(color2 < 0 || color2 > 255) return SendClientMessage(playerid, GREY, "Invalid color ID.");
	new vehicleid = AddStaticVehicleEx(model, x, y, z, a, color1, color2, 1800);
	if (family == 0) family = 255;
	else family -= 1;
	CreatePermanentVehicles(vehicleid);
	//PermanentVehicleStatistics[vehicleid][PermCarID]++;
	PermanentVehicleStatistics[vehicleid][IsPermCar] = 1;
	PermanentVehicleStatistics[vehicleid][PermCarID] = vehicleid;
	PermanentVehicleStatistics[vehicleid][PermCarModel] = model;
	PermanentVehicleStatistics[vehicleid][PermCarFaction] = faction;
	PermanentVehicleStatistics[vehicleid][PermCarFamily] = family;
	PermanentVehicleStatistics[vehicleid][PermCarVIP] = vip;
	PermanentVehicleStatistics[vehicleid][PermCarX] = x;
    PermanentVehicleStatistics[vehicleid][PermCarY] = y;
    PermanentVehicleStatistics[vehicleid][PermCarZ] = z;
    PermanentVehicleStatistics[vehicleid][PermCarRot] = a;
    PermanentVehicleStatistics[vehicleid][PermCarColors][1] = color1;
    PermanentVehicleStatistics[vehicleid][PermCarColors][2] = color2;
    SetPlayerPos(playerid, x, y, z + 2);
    TogglePlayerControllable(playerid, 0);
    SetTimerEx("UnfreezeMeNow", 800, false, "i", playerid);
    ResetEnumVar(vehicleid);
    permcars++;
    SavePermanentVehicles();
    new string[128];
    format(string, sizeof(string), "Permcar #%d created (/permcardel, /permcarloc, /permcarfac).", vehicleid);
    SendClientMessage(playerid, GREY, string);
96162
Код:
	}
	Vehicles=i-1;
	mysql_free_result();
}
I'm not the one scripting this. and I dunno how to script. if you have any ideas, please break it down into easy terminology and steps because i'm at a loss as well as my partner
Reply
#2

(40306) : You don't have the function CreatePermanentVehicles in your GameMode.
(96162) : You created the variable "Vehicles" and don't are using ...
Reply
#3

You must define CreatePermanentVehicles, and the second is just a warning, I ignore those because I am too lazy, and it does nothing bad to the script..
Reply
#4

Quote:
Originally Posted by [MM]18240[FMB]
Посмотреть сообщение
You must define CreatePermanentVehicles, and the second is just a warning, I ignore those because I am too lazy, and it does nothing bad to the script..
Except for not functioning, right? Or crashing your gamemode, right? Too lazy? Then stop scripting or fix the damn warnings as well and stop pushing your laziness onto other people who DO want to code the right way!
Reply
#5

guys i didn't create this topic for a fight. thanks for the help to tom who helped on skype and those that reminded me about the define. i appreciate it.
+Repped
Reply
#6

Best of luck, DJ_Shocker, hope your server works out well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)