Yoko

All sides of Injection
It is currently 2025-11-07 16:51:51

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: refering to an object
PostPosted: 2005-07-14 20:12:02 
Offline

Joined: 2005-07-14 20:04:18
Posts: 8
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.

Top
   
 Post subject:
PostPosted: 2005-07-14 20:15:29 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
You don't have a uo.gethealth(onject) finction, so use UO.GetHP(object).
Other stuff is correct.


Top
   
 Post subject: omfg thx
PostPosted: 2005-07-14 20:25:26 
Offline

Joined: 2005-07-14 20:04:18
Posts: 8
the misstake was actually that it has to be...

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

... as it seems

kthx for quick reply


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited