Grant_Money(n as num)
set category = "Admin"
for(var/mob/M in world)
M.money += n
What am I doing wrong?
-Camaro-
ID:174968
![]() Jun 28 2003, 5:25 am
|
|
I've been trying to get this to work, but it's just not working right. When I use this verb, everyone in the world gets the money. Infact, it doesn't even let me choose a mob in world o_O. Such an easy piece of code, yet i'm stumped >_<
Grant_Money(n as num) What am I doing wrong? -Camaro- |
You're making a bad assumption: That looping through all mobs in the world will give you a choice as to which one you give money to. It won't.
If you say for(var/mob/M in world), DM will in fact loop through every mob in the world, just like you told it to.
Lummox JR