why isn't it reading the var/help for my objs in usr.client.screen....
it gives me this errorruntime error: Cannot read null.help
proc name: MouseEntered (/obj/MouseEntered)
source file: mainmenu.dm,288
usr: the t (/mob/Snowmonsters/TownB)
src: Main Menu (/obj/hud/menus/main)
call stack:
Main Menu (/obj/hud/menus/main): MouseEntered(null)
my code is...
obj
var
help=""
MouseEntered(var/obj/O as obj in usr.client.screen)
sleep(50)
alert("[O.help]")
I'm trying to make it just so I can have a help var for each obj in usr.client.screen and it alerts it to the user... once I get this part working I'm going to tweak it so it doesn't alert if the mouse exited but I'll dothat in a sec that's the easy part...
*EDIT*
I have got a system that partially works...
it displays the message
but for every screen obj it displays the same message... over and voer again no matter what screen obj...obj
var
help="No help yet for this button"
opened=0
entered=0
MouseEntered(var/obj/O)
for(O as obj in usr.client.screen)
O.entered=1
if(O.entered==1)
O.opened=0
sleep(75)
if(O.opened!=1)
alert("[O.help]")
return
else
return
else
return
MouseExited(var/obj/O as obj)
for(O as obj in usr.client.screen)
if(O.entered==1)
O.entered=0
if(O.opened==0)
O.opened=1
return
ID:266808
Jul 7 2002, 8:44 pm
|
|
In response to ShadowSiientx
|
|
Thats a start.. o_O
|
In response to ShadowSiientx
|
|
lol that's weird it should default to it shouldn't it?... err wait a sec... but it gives me an alert message ! hah... but ya that isn't the problem...
errr nm I played with it and got it to work, forgot that the src was the obj!!! ya so this works if anyone is wondering how to do it... obj |
alert(usr,"[O.help]")