Hi, thanks QaK for your answer, but when i asked for and explanation i wanted to know in detail what does it do, because once i tried to do something different but it didn't worked... Here is some piece of code:
--------------------------------------------------------
NpcID: array[1..100] of integer; // <-- integer, NOT STRING!!!
NpcX: array[1..100] of integer;
NpcY: array[1..100] of integer;
NpcZ: array[1..100] of integer;
------//-----
NpcID[i]:=ReadD(2);
NpcX[i]:=ReadD(14);
NpcY[i]:=ReadD(18);
NpcZ[i]:=ReadD(22);
----------------------------------------------------
If i tried to do this using string array i got an "incompatibility error".... Only this way worked.
Also i wanted to calculate distance using Pythagoras (sqrt((x*x)+(y*y)), but sometimes i got erros (negative values, theoricaly impossible), thas why i wanted to understand it better.
----
"function ord is for conversion between string-type and integer-type variables. Read the syntax of Pascal and Delphi."
why don't you use StrToInt?????
Thanks, Charly.
|