ID:146418
 
Hi all,i was wondering i have too peaces of code and i was wondering how on earth can i prevent people from iting to be when i have blocked Instant transmission off and vice verse

heres the code i have for the blocking part of it

mob/verb/BLOCK_it()
block = 1
mob/verb/unblock_it()
block=0

mob/var
block

obj/it/verb/it()
if(block==1)
usr<<"[M] has blockd it"
else
usr.loc=locate(Mx,My-1,Mz)
usr<<"You IT to [M]"


For my Instant Tranmission part is

obj
it
verb
Instant_Transmission(mob/characters/M in world)
set name = "Instant Transmission"
set category = "Fighting"
if(usr.dead == 1)
usr<<"You can't use IT when you are Dead!"
if(tfa == 1)
usr<<"[M] is too far away"

else
for(var/mob/characters/P in oview(1))
if(P.npp == 1||P.npc == 1)
usr << "<b>You cannot bring [P.name] with you."
else
P.loc=locate(M.x,M.y+1,M.z)
P << "<b>[usr] brings you to [M] with Instant Transmission."
usr.x = M:x
usr.y = M:y-1
usr.z = M:z
usr.safe = 0
usr << "You go infront of [M]."
M << "[usr] blurs in front of you."


How can i go about doing this?



mob/verb
Transmit(m as mob, x as text)
if(transmitting == "Yes")
m << "[usr] says: [x]"
else
usr << "[m] has transmissions turned off!"

Other than indentation, that should work, or something along those lines.


--Vito
In response to Vito Stolidus
I get this error

blockit.dm:3:error:transmitting:undefined var
In response to Govegtos
I don't understand this... your transmitting verb seems to be a teleport verb o.o and then vito brings something with txt :S
In response to CIB
So like this

mob/verb
IT(m as mob, x as text)
if(transmitting == "Yes")
m << "[usr] says: [x]"
else
usr << "[m] has transmissions turned off!"
In response to Govegtos
No. Text has nothing to do with the problem.


mob/verb/IT_Block()
if(!Block)
src << "You block IT"
src.Block=1
else
src << "You unblock IT"
src.Block=0


In response to N1ghtW1ng
For a more compact sake:
mob/verb/blockit()
block=!block
src<<"You [block?"":"un"]block IT."
obj
it
verb
Instant_Transmission(mob/characters/M in world)
set name = "Instant Transmission"
set category = "Fighting"
if(M.block)
usr << "[M] has blocked transmissions."
return
...


~X
How many times do you want me to tell you not to do if(var==1) or if(var==0)?
In response to DeathAwaitsU
guess you have to do it untill he finnaly listens :P

O-matic
In response to O-matic
What does this error mean?

skills.dm:76:error:M.block:undefined var

How can i fix this?

here is what i have

obj
it
verb
Instant_Transmission(mob/characters/M in world)
set name = "Instant Transmission"
set category = "Fighting"
if(M.block)
usr << "[M] has blocked transmissions."
return
...


On that line i have

                if(M.block)
In response to Govegtos
It means:
It seems that you are ripping Zeta, or have no coding/error/problem solving/finding experience. Please refer to the DM guide for further help on this subject
In response to Govegtos
if you dont even know how to define a var do one of these two things


STOP attempting to code
read the dm guide and do a lot of practice.


heres the DM-guide:
http://www.byond.com/docs/guide/
and also I recommon:

http://developer.byond.com/hub/Zilal/ZBT

that should help you on your way up.

O-matic
In response to O-matic
O-matic wrote:
if you dont even know how to define a var do one of these two things


STOP attempting to code
read the dm guide and do a lot of practice.


...Ever come to think hes just not learning how to code..and O Matic..Your not the best coder out there...So I think you don't tell to be telling people to stop coding..When I first learned I asked tons of people what such and such was...and no one discouraged me by saying..'STOP Trying to code..'

Aseoran :)
In response to Aseoran
Aseoran, I think that you're misunderstanding what O-matic was saying. He's saying that Govegtos should put aside his game for now, and he should read the DM Guide instead. If he's having trouble defining variables, then I'd say that that's pretty good advice.
In response to Wizkidd0123
I would still say thats discouraging...But whatever..
In response to Aseoran
Aseoran wrote:
O-matic wrote:
if you dont even know how to define a var do one of these two things


STOP attempting to code
read the dm guide and do a lot of practice.

...Ever come to think hes just not learning how to code..and O Matic..Your not the best coder out there...So I think you don't tell to be telling people to stop coding..

first of all I never said that I'm the best coder around here. and just because I'm not the best coder doesn't mean I cant give out advise

When I first learned I asked tons of people what such and such was...and no one discouraged me by saying..'STOP
Trying to code..'

I'm not telling to stop trying to code; My point is (like Wizzkid0123 said) I advised him to stop coding if he doesn't know how to define a var, or read the DM-guide.

so please stop this stupidness, in my eyes you've just made yourself look like a little kid who wants to make me look stupid.

O-matic
In response to Govegtos
Dude, thats sad, you dont even know how to define a varible...
In response to RavenHeart
And your point is what?
In response to Govegtos
Nobody's going to help you. You're ripping Zeta, you don't know how to code, you know nothing about Dream Maker. Get in to shape, Govegtos.
Page: 1 2