Problem description:
Hello Byond back again, this time with a run-time error I can make no sense of.
proc name: Speed Slash (/speed/verb/Speed_Slash)
source file: Verbs.dm,22
usr: the asca (/mob/characters/Human)
src: Dragonpearl123 (/client)
usr.loc: the grass (44,39,1) (/turf/grass)
call stack:
Dragonpearl123 (/client): Speed Slash()
Every verb I call under speed that happens,
speed
verb
Speed_Slash()
if(Slash_Delay==1)
set category = "Techniques"
var/list/Players = new()
for(var/mob/M in view(5))
if(M.client)
Players+="[M]"
Players-="[usr]"
var/T = input("What player would you like to Slash to?","Teleport")in Players
for(var/mob/M in view(5))
if(T == M.name)
var/damage = usr.speed - M.defense
M.power -= damage
usr.loc = locate(M.x+rand(1,5),M.y+rand(1,5),M.z)
M<<{"<font size="-1" color="#F0AF23">[usr] slashed you with his speed for [damage] damage!."}
usr<<{"<font size="-1" color="#F0AF23">You slash [M] for [damage] damage!"}
M.deathcheck()
usr.Levelup()
spawn(3)
usr.icon_state=""
if(value != 1)
Slash_Delay=0
value = 1
spawn() Cooldown()
valueCD = world.timeofday + 100
speed
verb
Ultra_Buff()
set category = "Techniques"
set name = "Acceleration"
//src.overlays += /obj/aura
src<<"Your speed has been boosted for a shurt duration!"
src.speed += src.speed * 0.5
spawn(60*2.5)
src<<"Your speed has reverted to normal!"
src.speed -= src.speed * 0.5
runtime error: undefined variable /client/var/Slash_Delay
proc name: Speed Slash (/speed/verb/Speed_Slash)
source file: Verbs.dm,22
usr: the asca (/mob/characters/Human)
src: Dragonpearl123 (/client)
usr.loc: the grass (44,22,1) (/turf/grass)
call stack:
Dragonpearl123 (/client): Speed Slash()
runtime error: undefined variable /client/var/speed
proc name: Acceleration (/speed/verb/Ultra_Buff)
source file: Verbs.dm,54
usr: the asca (/mob/characters/Human)
src: Dragonpearl123 (/client)
usr.loc: the grass (44,22,1) (/turf/grass)
call stack:
Dragonpearl123 (/client): Acceleration()
Your speed has been boosted for a shurt duration!<--- It shows that but doesn't increase my speed at alll.
client
New()
if(key in admins)
verbs.Add(typesof(/admin/verb))
verbs.Add(typesof(/speed/verb))
..()
That was where I gave myself the verbs.
The problem is that you are implying src when what you should be using is usr in this case. When you are storing verbs in a datum like this, it's technically okay to use usr. In this case, src is the client because you have changed the owner of the verb to the client, not their player. This is ugly ass code, though because it's become incredibly unsafe to use because of the potentially unknown src value.
I'm also going to fix a few things, though.
1) You don't need to loop through the view twice.
2) src isn't technically src in this case. It's implied that usr is src, but usr ought to be typecast to the correct type for safety.
3) Your ultra buff was bugged because it added 50% to the speed, but took 50% of the added value away. If your speed was 100 when you used it, your speed would be boosted to 150, but then dropped to 75 after you used it. Permanently.
4) I also removed most of your spawns. They were broken anyway. There's no need to spawn inside of a verb that you aren't going to call as a proc. Even then if you are, just set waitfor = 0.
5) I fixed your settings. They were wrong.