Page 1 of 1

Problems with serials

Posted: 2004-10-12 18:07:11
by Fonzy
There are problems with objects serials.

Var obj=0x01513515 DOESN'T WORK
Var obj="0x01513515" WORKS

Now if i read from a file the objects serials, i can't decide which type is what i read (string, int), so i would need some kind of cast from string (or whatever it is) to serial..

For example i read from a file a serial and put in the variable obj.

if I see var(obj) it says 0
If i see str(obj) it says 0
If i see obj it says the correct serial, but i can't use it in functions like getgraphic and similars.

Anyone can help?

Posted: 2004-10-12 18:52:45
by Keneth
in a script i have i read from a file serial numbers. In the file i have the serial numbers like:

0x40043333
0x4002FE4E


In the script i use:

Animal=safe call f.ReadString()


Then if i use the var i use:

UO.WaitTargetObject(Animal)


Btw, sorry my bad english :)

Posted: 2004-10-12 19:22:04
by Fonzy
ok i'm sorry there was an error in my script. I didn't know that the readline function puts a char at the end of the line (eof, return?). That was the problem.