well actuali I was working in a Script.. not really for ofpr... jjeeje just to do more Easly mi Matts Homework...
i it is about all the Sin Cos Tan thing.. but in in a special case I have a rare error!! not really sure wy this happen... maybe I have a Grammar mistake.. or mi Matts arent really good...
well this is the script wich has a rarely malfuction...
;tarea de MAtematicas "sohCahToa.sqs"
;NOTE Change the X for a 0
;And the _line must be Adyasent to the Angle
;it still Beta....
;use like this: [Catet,Hipotenusa,Angle] exec "sohcahtoa.sqs"
Hint "Executing..."
_arr = count _this
? _arr == 3 : goto "SohCahToa"
? _arr == 4 : goto "inverse"
? _arr <= 1 : hint "Error 001: Parametros mal definidos"; exit
? _arr > 4 : hint "Error 002: Demasiados Parametros"; exit
#SohCahToa
_Hip = _this select 0
_linea =_this select 1
_angulo1 =_this select 2
? _hip == 0 : Goto "toa"
? _linea == 0 : Goto "SohCah"
hint "Error 003: Algo esta mal definido"
exit
#toa
hint "Cargados: 3 Elementos (SohCahToa)\n Calculando Hipotenusa"
~1
[b];Problem starts here[/b]
_ncos = cos _angulo1
_rcos = _linea / _rcos
_ntan = tg _angulo1
_rtan = _ntan * _linea
hintC format ["Operacion Realizada:(Angulo %1)\nCateto Adyasente:%2\nCateto Opuesto %3\nHipotenusa %4\n\nTan:%4 Cos:%6",_angulo1,_linea,_rtan,_rcos,_ntan,_ncos]
[b];Problem ends here[/b]
Exit
#sohCah
hint "Cargados: 3 Elementos (SohCahToa)\n Calculando Catetos"
~1
_ncos = cos _angulo1
_ncos2 = sin _angulo1
_rcos = _ncos * _Hip
_rcos2 = _ncos2 * _Hip
hintC format ["Operacion Realizada:(Angulo %1)\nCateto Adyasente:%2\nCateto Opuesto:%3\nHipotenusa %4\n\nCos: %5 Sen: %6",_angulo1,_rcos,_rcos2,_Hip,_ncos,_ncos2]
Exit
#inverse
hint "Cargados: 4 Elementos (Asen Acos Atan)\nEn Construccion"
exit
and the problem is when_linea = 0
is in Spanish.. but I dont think this will be aproblem