13.05.2015, 21:03
You should get used to debugging.
The best debugging processes IMO are crashdetect and debug printing.
By crashdetect I obviously mean the plugin. By debug printing I mean something like this:
I always tend to first try debug printing, and I always have crashdetect running in my test server.
The best debugging processes IMO are crashdetect and debug printing.
By crashdetect I obviously mean the plugin. By debug printing I mean something like this:
pawn Код:
CMD:exit(playerid) {
printf("Initial Command Call");
if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.6040,63.7641,1003.6406)) {
printf("[D] 1");
SetPlayerPos(playerid, 1553.9977,-1675.6483,16.1953);
SetPlayerInterior(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, -2027.5374,-105.0062,1035.1719)) {
printf("[D] 2");
SetPlayerPos(playerid, 1284.8177,-1585.1346,13.5469);
SetPlayerInterior(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2305.8345,-16.0619,26.7496)) {
printf("[D] 3");
SetPlayerPos(playerid, 1459.5800,-1011.4103,26.8438);
SetPlayerInterior(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 3161.4094,-442.7526,10.6328)) {
printf("[D] 4");
SetPlayerPos(playerid, 1172.7821,-1325.3270,15.4007);
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[houseEntered{playerid}][hIntX], HouseInfo[houseEntered{playerid}][hIntY], HouseInfo[houseEntered{playerid}][hIntZ])) {
printf("[H] 1");
SetPlayerPos(playerid, HouseInfo[houseEntered{playerid}][hX], HouseInfo[houseEntered{playerid}][hY], HouseInfo[houseEntered{playerid}][hZ]);
printf("[H] 2");
SetPlayerInterior(playerid, 0);
printf("[H] 3");
houseEntered{playerid} = 0;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[bizEntered{playerid}][bIntX], BusinessInfo[bizEntered{playerid}][bIntY], BusinessInfo[bizEntered{playerid}][bIntZ])) {
printf("[B] 1");
SetPlayerPos(playerid, BusinessInfo[bizEntered{playerid}][bX], BusinessInfo[bizEntered{playerid}][bY], BusinessInfo[bizEntered{playerid}][bZ]);
printf("[B] 2");
SetPlayerInterior(playerid, 0);
printf("[B] 3");
bizEntered{playerid} = 0;
}
return 1;
}