ID:145971
 
Code:
mob
proc
be_a_dumbass()
set name="be a dumbass"
walk(src,0)
if(AI == "be a dumbass") AI=null
if(overrideAI == "be a dumbass") overrideAI=null
return

aggressive_fight(mob/M,oldloc)
if(turns)
sleep(20)
if(!M)return
M.attackedme += src
var/mob/N
for(N in M.followers)
N.attackedme += src
if(rand(1,100)<(src.mp/src.maxmp)*50)
if(src:offence_spells.len)
var/V = pickfrom(src:offence_spells) //this is where the problem resides as well in many diffrent areas within the code

usr=src
call(V)(M)
return
turns--
walk_to(src,M,1,src.speed())
M.underlays.Add(/obj/hit)
spawn(20)
if(!M)return
M.underlays.Remove(/obj/hit)
walk(src,0)
if(hp && combat)
loc = oldloc
if(M)
src.dir = src.face(M)
underlays.Remove(/obj/turns)
var/obj/O
var/adddamage
var/damage=0
for(O as obj in equipped)
if(O.attackeffect && O.canattack.Find(attacktype))
adddamage= call(O.attackeffect, "effect")(src, M, O)
if(isnum(adddamage))
damage += adddamage
else
if(adddamage == "evaded")
view(M, 5) << "\italic[M.name]\i evades \bold[usr.name]'s\b attack."
damage=adddamage
break
if(isnum(damage))
damage = round(damage)
if(damage < 1) damage=1
view(M,5) << "[src.name] attacks [M.name] for [damage] damage."
M.hp -= damage


Problem description:

ai.dm:155:error:pickfrom:undefined proc
I'm figuring that it probally requires a external file to function properly either that or its missing a library to make this work...
If you need more information I am currently re-writing the Dreamoor 3.0 code and this error is coming from the ai.dm file as well as several others...
my MSN is [email protected] if you have questions.
Well, I looked trough it briefly and this problem can't be solved unless you post some extra code.

Pickfrom() is not a predefined proc in BYOND so unless you ment pick() you need to post the code where you defined the pickfrom() proc.

I'll look trough it again if you could do this.

- Fint
what's pickfrom? There exists a proc called simply 'pick()', but no pickfrom unless you know it is defined. If it is, it is probably a child of another object. Also, why are you using :s?
In response to Fint
Perhaps I should mention that this code is QUITE OLD... lol
it still had
visibility = 0
instead of
invisibility = 1

so the pickfrom proc may very well be pick...

[EDIT]
I just did a find all for proc/pickfrom and came up with a whole lotta bumpkis.
In response to Kator
global replaced 'pickfrom' to 'pick' and now I'm down to 4 errors... probaly also simple in themselves... but if my debugging skill goes out the window I'll post here.

[EDIT] now down to 3 errors...
skill.dm:2473:error:M.right:undefined proc
skill.dm:2473:error:M.left:undefined proc
proc/Illusion(mob/M, amount)
var/places[] = list(M.loc, M.left(),M.right())
var/mobs[] = list(M)
if(M.dir!=NORTH&&M.dir!=SOUTH&&M.dir!=EAST&&M.dir!=WEST)
M.dir=SOUTH
var/olddir = M.dir
walk(M,0)
var/makemore = 2
while(makemore)
makemore--
var/mob/N = new/mob
mobs += N
N.icon = M.icon
N.icon_state = M.icon_state
N.name = M.name
N.loc = M.loc
N.defendeffects += new/effects/illusionary
spawn(50*amount)
if(N)
if(N.combat)N.combat.flee(N)
del(N)
var/mob/P
sleep(3)
for(P as mob in mobs)
P.Move(pick(places))
places -= P.loc
P.dir = olddir

combat.dm:580:error:M.behind:undefined proc
(this is a snip. the actual bit is rather large)
  jump_kick(mob/M)
if(ismob(M) && usr.turns)
usr.turns--
usr.underlays.Remove(/obj/turns)
call(/attacks/proc/attack_move)(M)
var/damage = rand(1,usr.skill:Karate/2+usr.Speed/2)
if(!M.Move(get_step(M, M.behind()))) //this is where the behind bit is causing problems
damage *= 1.25
damage = filter_effects(damage,usr,M)
M.hp -= damage
view(5) << "[usr.name] jump kicks [M.name] for [damage] damage."
quest_check(usr, M)

Unfortunately I cannot find procs for any of these... >.< nor do I know where to start...
(is a newbie coder working with pre-built code [done back in 2002 mind you] to learn how some functions work by editing and watching reactions... it's just how I learn.)
In response to Kator
Mmm, well one thing you could do it read trough the code, make clear what the pickfrom() proc needs to do and decide if you can use the pick() proc OR write your own code that sould do the trick.

When i look at it my guess is that offence_spells is a list that "contains" procs (that represent a spell) which are then called by the call() proc.

call(V) (M) would meen that the V proc is called with arguments M

Hope that helps ;)

Oh and
usr = src
looks like something bad, although i don't know why n_n
In response to Fint
Fint wrote:
Mmm, well one thing you could do it read trough the code, make clear what the pickfrom() proc needs to do and decide if you can use the pick() proc OR write your own code that sould do the trick.

When i look at it my guess is that offence_spells is a list that "contains" procs (that represent a spell) which are then called by the call() proc.

call(V) (M) would meen that the V proc is called with arguments M

Hope that helps ;)

Oh and
usr = src
looks like something bad, although i don't know why n_n
I don't know why either but BYOND DM doesn't bitch about it so I don't mind it much. I just want to get this compiled to learn about it.
In response to Kator
BTW, if it would make things easier my MSN is [email protected]
my AIM is PuffThePotSmoker
and my yahoo is x_apb91781_x