18.03.2013, 22:14
From some reason pawncc started crashing when I want to compile my gm, I've commented all new things I added and still crashing,
This is what I inserted new:
And as I said, this is now all commented so there is no need to crash, I compiled gm without any problems before I added this..
This is what I inserted new:
pawn Код:
enum {
QUERY_NONE,//0
INSERT_VEHICLE_QUERY,//1
LOAD_VEHICLES_QUERY,//2
LOAD_PLAYER_QUERY,//3
REGISTER_PLAYER_QUERY,//4
LOAD_HOUSES_QUERY,//5
ADD_HOUSE_QUERY,//6
LOAD_BUSINESS_QUERY,//7
ADD_BUSINESS_QUERY,//8
LIST_VEHICLES_QUERY,//9
LOAD_OWNED_QUERY,//10
LOAD_OWNED_PARTS,
PARK_VEHICLE_QUERY,
UPDATE_PARTS_QUERY,
PARKED_QUERY,
VEHICLE_BUY_QUERY,
LOAD_JOBS_QUERY,
LOAD_JOB_CHECKPOINTS,
ADD_JOB_QUERY,
ADD_CHECKPOINT_QUERY,
LOAD_OBJECTS_QUERY,
LOAD_POSITIONS_QUERY,
ADD_POINT_QUERY,
ADD_ATM_QUERY,
LOAD_ATMS_QUERY,
SAVE_HOUSE_QUERY,
ADD_GAS_STATION_QUERY,
LOAD_GAS_STATIONS_QUERY,
CHECK_NUMBER_QUERY,
DELETE_VEHICLE_QUERY,
LOAD_PUBLIC_PHONES_QUERY,
ADD_PUBLIC_PHONE_QUERY,
SAVE_PLAYER_QUERY,
ADD_SPEEDCAM_QUERY,
LOAD_SPEEDCAMS_QUERY,
LOAD_DRUGS_QUERY,
ADD_DRUG_QUERY,
ADD_DRUG_SUPSTANCE_QUERY,
LOAD_DRUG_SUPSTANCE_QUERY,
LOAD_PLAYER_DRUGS_QUERY,
ADD_MENU_ITEM_QUERY,
LOAD_MENU_ITEMS_QUERY,
UPDATE_POINT_QUERY,
CLOSE_SERVER_QUERY,
SAVE_VEHICLE_QUERY,
LOAD_MOTELS_QUERY,
INSERT_MOTEL_QUERY,
LOAD_MOTEL_ROOMS,
INSERT_ROOM_QUERY,
DELETE_COV_QUERY,
SAVE_BUSINESS_QUERY,
LOAD_STREETS_QUERY,
LOAD_MOVABLE_OBJECTS,
LOAD_FACTIONS_QUERY,
LOAD_FACTIONS_RANKS,
ADD_FACTION_QUERY,
ADD_RANK_QUERY,
LOAD_LEADERS_QUERY,
DELETE_JOB_QUERY,
DELETE_CHECKPOINTS_QUERY,
MOVE_FACTION_QUERY,
MOVE_HOUSE_QUERY,
MOVE_BUSINESS_QUERY,
MOVE_JOB_QUERY,
CHECK_PLATE_QUERY,
CHECK_ID_QUERY,
QUERY_LIST_LIDERS,
QUERY_ADD_LEADER,
ADMIN_LOGIN_QUERY//this is what i added
pawn Код:
CMD:adminlogin(playerid, params[]){
new Password[42], Name[MAX_PLAYER_NAME], Query[128];
if(sscanf(params, "s[24]s[33]", Name, Password)){
SendClientMessage(playerid, COLOR_GREY, "KORISCENJE: /adminlogin [Name] [Password]");
return true;
}
mysql_real_escape_string(Name, Name);
format(Query, sizeof(Query), "SELECT `Administrator` FROM "TABLE_PLAYERS" WHERE `DisplayName` = '%s' AND `Password` = '%s';", Name, MD5_Hash(Password));
mysql_query(Query, ADMIN_LOGIN_QUERY, playerid);
return true;
}
pawn Код:
case ADMIN_LOGIN_QUERY: {
mysql_store_result();
new aLevel = mysql_fetch_int();
if(!aLevel) {
SendClientMessage(extraid, COLOR_RED, "Taj igrac nije administrator.");
}else {
PlayerInfos[extraid][pAdministrator] = aLevel;
}
mysql_free_result();
return true;
}