refering to an object

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
verY
Posts: 8
Joined: 2005-07-14 20:04:18

refering to an object

Post by verY »

sup mates
im having just a quick question about objects
lets have a look at the following script (its dumb but it shows my problem):

sub test()
if uo.gethealth(lastattack) > 0 then
uo.print ("target alive")
endif
end sub

when i wanna exec it, it says: "variable undefined - lastattack"

but why? lastattack is meant to a pointer to the object(player) i attacked last..
and when i do something like

uo.cast ("'Flame' lastattack") it works..

so where is the misstake in the 1st script?

kthx for answers
Last edited by verY on 2005-07-14 20:25:48, edited 1 time in total.
flake
Expert!
Posts: 746
Joined: 2004-08-11 23:56:17
Location: The Citadel
Contact:

Post by flake »

You don't have a uo.gethealth(onject) finction, so use UO.GetHP(object).
Other stuff is correct.
verY
Posts: 8
Joined: 2005-07-14 20:04:18

omfg thx

Post by verY »

the misstake was actually that it has to be...

if uo.getHP("lastattack") > 0 then

... as it seems

kthx for quick reply
Post Reply