ID:140747
 
Code:
turf/generators
knightgen
New()
..()
spawn()
regen()
proc
regen()
while(src)
make(10)
sleep(600)
make()
var/mob/knight/S = new(usr.loc)
S<<"warning removal"


Problem description:
I KNOW THIS IS ABUSE OF THE USR.

I just cant figur out what to put instead(notice time i do not have 2 new topics right next to eachother they are 23 hours 21 minutes apart.
Goal
I'm trying to make a turf that generates aknight at its location.

Gigimoi wrote:
Code:
> turf/generators
> knightgen
> New()
> ..()
> spawn()
> regen()
> proc
> regen()
> while(src)
> make(10)
> sleep(600)
> make()
> var/mob/knight/S = new(usr.loc)
> S<<"warning removal"
>

Problem description:
I KNOW THIS IS ABUSE OF THE USR.

I just cant figur out what to put instead(notice time i do not have 2 new topics right next to eachother they are 23 hours 21 minutes apart.
Goal
I'm trying to make a turf that generates aknight at its location.


This sounds like you want us to do the work for you. Firstly, why did you put make(10) when make() has no args? Why even make a proc anyways, its only two lines, and your probably not even going to use it again for this npc. Also, why is it turf/generators? Lastly, why did you do S<< that's telling a npc something, which makes no sense whatsoever.
In response to Megelic
its called generators because it is going to generate a knight a its position, this is incomplete code it DOES have args and they are edited by admins,S<< removes the warning i get from unused variable
In response to Gigimoi
I don't know if this is a good method, correct me if I'm wrong(anybody), but couldn't you use this line:
new /mob/knight/(src.loc)
In response to Megelic
maybe ill test and post results in edit



Edit: It works, kinof, it makes the npc but, puts it in first availible loc (1,1,1).hmmmmmmmmm how to fix that
In response to Gigimoi
I want to know one thing, how are the args "edited" by admins?
In response to Megelic
a global variable and a verb that lets you enter "FOCUS ON THE PROBLEM MY ADMINISTRATIVE PROGRAMING IS GOOD"
In response to Gigimoi
Gigimoi wrote:
maybe ill test and post results in edit



Edit: It works, kinof, it makes the npc but, puts it in first availible loc (1,1,1).hmmmmmmmmm how to fix that

loc=locate(x,y,z)
In response to Gigimoi
What you are saying makes no sense. It is not possible in any way to add an argument to a proc at runtime.

Do you even know what an argument is?
In response to Karnaji
Karnaji wrote:
Gigimoi wrote:
maybe ill test and post results in edit



Edit: It works, kinof, it makes the npc but, puts it in first availible loc (1,1,1).hmmmmmmmmm how to fix that

loc=locate(x,y,z)

No, damnit. That's wrong and I need to stop seeing that before I have an aneurysm. In this case, the issue is that since src is a turf, src.loc is an area. So, you'd just do new /blah(src) instead of new /blah(src.loc). Simple.
In response to Garthor
actualy if your talking to me yes and, i figured out how, thanks guys

turf/generators
knightgen
New()
..()
spawn()
regen()
proc
regen()
while(src)
make(10)
sleep(600)
make()
new /mob/knight/(locate(x,y,z))

for fear of hacking admin editables removed
In response to Gigimoi
It still says make(10).
In response to Megelic
i know...IT HAS VARIABLES i just removed them in post
In response to Gigimoi
Replace the locate(x,y,z) with just "src". Seriously. I am literally sick of seeing locate(x,y,z).

And also possibly the depth-of-field in Mirror's Edge.
In response to Garthor
lol i hate mirrors edge 2
In response to Gigimoi
Gigimoi wrote:
a global variable and a verb that lets you enter "FOCUS ON THE PROBLEM MY ADMINISTRATIVE PROGRAMING IS GOOD"

I'm positive your code has waaay more problems than then few you've posted about, so yelling at everyone isn't going to help much.
In response to Ephemerality
No, no, the problem is that he says he can change the args at runtime.