ID:146457
 
Code:
obj/hud
save
icon='menus.dmi'
icon_state = "save"
name = "Save"
layer=21
New()
src.screen_loc="1,1"
usr.client.screen+=src
Click()
usr << "Your data has been saved" //Shows in the text box
verb
SaveMob() //Calls the save mob proc


Problem description:
i want it so when the plaer logs in the hud appears on their screen.

new /obj/hud/save(src.client)

Put that in your login code, along with chaning the hud's to client.

obj
hud
save
New(atom/Loc,client/C)
if(istyp(Loc))
src.loc=Loc
if(istype(C))
C.screen+= src
In response to Flame Sage
Verbs.dm:1:error:/obj/hud/save:duplicate definition
Verbs.dm:1:error:src.client:duplicate definition
Verbs.dm:1:error:new :instruction not allowed here
I get those earroes when i put that code in
In response to Flame Sage
Flame Sage wrote:
new /obj/hud/save(src.client)

Put that in your login code.
It should work.

Or, atleast if he had defined New() with an argument to accept the client. Which he doesn't. His way stinks too.

obj
hud
save
New(atom/Loc,client/C)
if(istyp(Loc))
src.loc=Loc
if(istype(C))
C.screen.Add(src)
In response to Teh Governator
obj
hud
save
New(atom/Loc,client/C)
if(istyp(Loc))
src.loc=Loc
if(istype(C))
C.screen.Add(src)



obj/hud
save
icon='menus.dmi'
icon_state = "save"
name = "Save"
layer=21
New()
src.screen_loc="1,1"
usr.client.screen+=src
Click()
usr << "Your data has been saved" //Shows in the text box
verb
SaveMob() //Calls the save mob proc

hud.dm:5:error:istyp:undefined proc
In response to Animekid09
I think even you can figure that are error (e)
In response to Flame Sage
i like using the dm :). But no i don't know the earror. I have never seen a demo or tutorial teaching me how to do that kind of code.
In response to Animekid09
opps o well lol
In response to Animekid09
HINT HINT: e
In response to Flame Sage
I don't c no e. But do i change the c into a e?
In response to Animekid09
-.- ISTYPE!!!
In response to Flame Sage
LMFAO ROFLMAO HAHAHA LOL HAHAHA LOL. ok it wasn't that funny but omfg i didn't c that coming.
In response to Animekid09
Wait i didn't get any earrors but the hud is still not appearing on the screen.
In response to Animekid09
put it under client/New()
client/New()
//Put it here.
..()
In response to Flame Sage
client/New()
obj
hud
save
New(atom/Loc,client/C)
if(istype(Loc))
src.loc=Loc
if(istype(C))
C.screen.Add(src)
..()

Welcome BYOND! (Version 341.877)
Connecting to file://C:\Documents and Settings\Nick\Desktop\BYOND\Dragon_Ball_Online\Dragon_Ball_Online.dmb.
Connection closed.
When i put it in like that update game and try and run it, when dream seeker opens up the game dosn't even open it just says Connection closed.
In response to Animekid09
thtas because you never put ..() in your client/New()
In response to Flame Sage
yeah i did u said to put the code in between them
In response to Animekid09
What?
I told you to put ..() after your client/New()
In response to Flame Sage
ok
In response to Flame Sage
Buty when i login in it does not appear
Page: 1 2