1CMD makes unknown command2A command crashes the serv
#1

This makes the server crash:
pawn Код:
if(dini_Int(string, "Mask") == 4)
{
if(dini_Int(string, "SkiType") == 0) return SendClientMessage(playerid, -1, ""#COLOR_GREY"Choose a ski mask by /setskimask.");
if(dini_Int(string, "Masked") == 0){ dini_IntSet(string, "Masked", 1); SetPlayerAttachedObject(playerid, INDEX_SKI, 19035+dini_Int(string, "SkiType"), 2, 0.096340, 0.009089, 0.003169, 84.762901, 93.027091, 0.000000, 1.000000, 1.000000, 1.000000);format(action, 256, "**%s wears his ski-mask on.", GetName(playerid));ProxDetector(24.0, playerid, action, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);}
else if(dini_Int(string, "Masked") == 1){ dini_IntSet(string, "Masked", 0); RemovePlayerAttachedObject(playerid, INDEX_SKI);format(action, 256, "**%s puts his ski-mask off.");ProxDetector(24.0, playerid, action, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);}
}
And this says unknown cmd:
pawn Код:
if(strcmp(cmd, "/vList", true) == 0 || strcmp(cmd, "/carlist", true) == 0)// -- Does not work - "Unknown cmd"
{
new car[256], string[256];
format(string, 256, "Users/%s.txt", plname);
if(dini_Int(string, "CarsOwned") == 0) return SendClientMessage(playerid, -1, ""#COLOR_GREY"You do not own any car.");
if(dini_Int(string, "Car1") > 0)
{
format(car, 256, "Vehicles/Car%d.txt", dini_Int(string, "Car1"));
if(!dini_Exists(car)) return SendClientMessage(playerid, -1, ""#COLOR_GREY"Error occoured on car no.1 (error #04)");
new msg[256];
format(msg, 256, ""#COLOR_MAGENTA"[CARINFO]Model: "#COLOR_RED"%s(%d)||"#COLOR_MAGENTA"Spawned:%d||Anyone in: %d||Price: %d", GetVehicleNameFromID(dini_Int(car, "Model")), dini_Int(car, "Model"), dini_Int(car, "Spawned"), AnyOneIn[dini_Int(string, "Car1")], dini_Int(car, "Price"));
SendClientMessage(playerid, -1, msg);
}
if(dini_Int(string, "Car2") > 0)
{
format(car, 256, "Vehicles/Car%d.txt", dini_Int(string, "Car2"));
if(!dini_Exists(car)) return SendClientMessage(playerid, -1, ""#COLOR_GREY"Error occoured on car no.2(error #04)");
new msg[256];
format(msg, 256, ""#COLOR_MAGENTA"[CARINFO]Model: "#COLOR_RED"%s(%d)||"#COLOR_MAGENTA"Spawned:%d||Anyone in: %d||Price: %d", GetVehicleNameFromID(dini_Int(car, "Model")), dini_Int(car, "Model"), dini_Int(car, "Spawned"), AnyOneIn[dini_Int(string, "Car2")], dini_Int(car, "Price"));
SendClientMessage(playerid, -1, msg);
}
if(dini_Int(string, "Car3") > 0)
{
format(car, 256, "Vehicles/Car%d.txt", dini_Int(string, "Car3"));
if(!dini_Exists(car)) return SendClientMessage(playerid, -1, ""#COLOR_GREY"Error occoured on car no.3(error #04)");
new msg[256];
format(msg, 256, ""#COLOR_MAGENTA"[CARINFO]Model: "#COLOR_RED"%s(%d)||"#COLOR_MAGENTA"Spawned:%d||Anyone in: %d||Price: %d", GetVehicleNameFromID(dini_Int(car, "Model")), dini_Int(car, "Model"), dini_Int(car, "Spawned"), AnyOneIn[dini_Int(string, "Car3")], dini_Int(car, "Price"));
SendClientMessage(playerid, -1, msg);
}
SendClientMessage(playerid, -1, "(Spawned is set to 0?Veh is spawned/Anyone in is set to 1?Someone is in the car)");
return 1;
}
Reply
#2

Do you have the folders 'Vehicles' and 'Users' in your scriptfiles?
Reply
#3

That's right. Also the others functions work until the else if comes.
And about vList, yeah. I also have more functions using Vehicles/Car.%d.txt" and etc. Somewhy vList says unknown command lolz.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)