if(!IsPlayerInRangeOfPoint(playerid, 1.0, -89.087181, -1184.843627, 2.940625)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado.");
Код:
if(!IsPlayerInRangeOfPoint(playerid, 1.0, -89.087181, -1184.843627, 2.940625)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); pasa que no funciona cuando estan las dos activadas por asм decirlo. |
if(!IsPlayerInRangeOfPoint(playerid, 1.0, -89.087181, -1184.843627, 2.940625 && !IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado.");
PHP код:
|
C:\Users\Usuario\Desktop\samp037_svr_R2-1-1_win32\gamemodes\srp.pwn(25932) : warning 213: tag mismatch C:\Users\Usuario\Desktop\samp037_svr_R2-1-1_win32\gamemodes\srp.pwn(25932) : error 001: expected token: ")", but found "return" Pawn compiler 3.10.2 Copyright © 1997-2006, ITB CompuPhase 1 Error.
if(!IsPlayerInRangeOfPoint(playerid, 1.0, -89.087181, -1184.843627, 2.940625 && !IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado.");
PHP код:
|
C:\Users\Usuario\Desktop\samp037_svr_R2-1-1_win32\gamemodes\srp.pwn(25932) : warning 217: loose indentation C:\Users\Usuario\Desktop\samp037_svr_R2-1-1_win32\gamemodes\srp.pwn(25934) : warning 217: loose indentation Pawn compiler 3.10.2 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
CMD:mecanico(playerid, params[]) { if(!PLAYER_WORKS[playerid][WORK_MECHANIC]) return SendClientMessage(playerid, -1, "{999999}No eres mecбnico."); if(PLAYER_TEMP[playerid][pt_WORKING_IN] != WORK_NONE && PLAYER_TEMP[playerid][pt_WORKING_IN] != WORK_MECHANIC) { SendClientMessageEx(playerid, -1, "{999999}Tienes que dejar de estar de servicio como %s primero.", work_info[ PLAYER_TEMP[playerid][pt_WORKING_IN] ][work_info_NAME]); return 1; } if(GetPlayerVirtualWorld(playerid) != 0) return SendClientMessage(playerid, -1, "{999999}No estбs en el lugar adecuado."); if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, -1, "{999999}No estбs en el lugar adecuado."); if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, -1, "{999999}No estбs depie."); if(!IsPlayerInRangeOfPoint(playerid, 1.0, -89.087181, -1184.843627, 2.940625) && !IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); //if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); if(!PLAYER_TEMP[playerid][pt_WORKING_IN]) StartPlayerJob(playerid, WORK_MECHANIC); else EndPlayerJob(playerid); return 1; }
Код:
C:\Users\Usuario\Desktop\samp037_svr_R2-1-1_win32\gamemodes\srp.pwn(25932) : warning 217: loose indentation C:\Users\Usuario\Desktop\samp037_svr_R2-1-1_win32\gamemodes\srp.pwn(25934) : warning 217: loose indentation Pawn compiler 3.10.2 Copyright © 1997-2006, ITB CompuPhase 2 Warnings. |
CMD:mecanico(playerid, params[]) { if(!PLAYER_WORKS[playerid][WORK_MECHANIC]) return SendClientMessage(playerid, -1, "{999999}No eres mecбnico."); if(PLAYER_TEMP[playerid][pt_WORKING_IN] != WORK_NONE && PLAYER_TEMP[playerid][pt_WORKING_IN] != WORK_MECHANIC) { SendClientMessageEx(playerid, -1, "{999999}Tienes que dejar de estar de servicio como %s primero.", work_info[ PLAYER_TEMP[playerid][pt_WORKING_IN] ][work_info_NAME]); return 1; } if(GetPlayerVirtualWorld(playerid) != 0) return SendClientMessage(playerid, -1, "{999999}No estбs en el lugar adecuado."); if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, -1, "{999999}No estбs en el lugar adecuado."); if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, -1, "{999999}No estбs depie."); if(!IsPlayerInRangeOfPoint(playerid, 1.0, -89.087181, -1184.843627, 2.940625) && !IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); //if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); if(!PLAYER_TEMP[playerid][pt_WORKING_IN]) StartPlayerJob(playerid, WORK_MECHANIC); else EndPlayerJob(playerid); return 1; }
Loose identation significa que su cуdigo todo este mal organizado organiza su cуdigo, usted deberнa saberlo ya que hasta un principiante lo sabe.
Код:
CMD:mecanico(playerid, params[]) { if(!PLAYER_WORKS[playerid][WORK_MECHANIC]) return SendClientMessage(playerid, -1, "{999999}No eres mecбnico."); if(PLAYER_TEMP[playerid][pt_WORKING_IN] != WORK_NONE && PLAYER_TEMP[playerid][pt_WORKING_IN] != WORK_MECHANIC) { SendClientMessageEx(playerid, -1, "{999999}Tienes que dejar de estar de servicio como %s primero.", work_info[ PLAYER_TEMP[playerid][pt_WORKING_IN] ][work_info_NAME]); return 1; } if(GetPlayerVirtualWorld(playerid) != 0) return SendClientMessage(playerid, -1, "{999999}No estбs en el lugar adecuado."); if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, -1, "{999999}No estбs en el lugar adecuado."); if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, -1, "{999999}No estбs depie."); if(!IsPlayerInRangeOfPoint(playerid, 1.0, -89.087181, -1184.843627, 2.940625) && !IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); //if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1989.88318, -1882.17322, 13.14038)) return SendClientMessage(playerid, 0x999999AA, "No estбs en el lugar adecuado."); if(!PLAYER_TEMP[playerid][pt_WORKING_IN]) StartPlayerJob(playerid, WORK_MECHANIC); else EndPlayerJob(playerid); return 1; } |