ID:1579248
 
(See the best response by King_ed.)
Code:
mob/proc/Check_Clones()
for(var/mob/Pokemon/P in world) if(P.owner==src)
var/mob/o=P.owner
P.loc = o
o.controlled=null
P.returned=1


Question: What exactly does this code do :/ ?

Checks all of the Pokemon in the world, if the Pokemon's owner is the src within the proc then the Pokemon's location is set to the src, they're controlled variable is set to null and their return variable is set to 1.
Best response
Maybe, before you start trying to code, stop copying code and read the DM guide. As for the past few days I have seen multiple posts from you, simple problems at that. So it is obvious you have not taken the time to look over the guide. So please read it, you may seem bored by it but it will consolidate your knowledge of the language and teach you more.
In response to King_ed
King_ed wrote:
Maybe, before you start trying to code, stop copying code and read the DM guide. As for the past few days I have seen multiple posts from you, simple problems at that. So it is obvious you have not taken the time to look over the guide. So please read it, you may seem bored by it but it will consolidate your knowledge of the language and teach you more.

I must admit, when I first started learning DM I learnt more from trial and error than I did staring at the guide. Though I'm not justifying learning the language by copying other peoples programming - why reinvent the wheel, if you don't know how to make one from scratch?
In response to Kaliba
Kaliba wrote:
King_ed wrote:
Maybe, before you start trying to code, stop copying code and read the DM guide. As for the past few days I have seen multiple posts from you, simple problems at that. So it is obvious you have not taken the time to look over the guide. So please read it, you may seem bored by it but it will consolidate your knowledge of the language and teach you more.

I must admit, when I first started learning DM I learnt more from trial and error than I did staring at the guide. Though I'm not justifying learning the language by copying other peoples programming - why reinvent the wheel, if you don't know how to make one from scratch?


Honestly, I started off in the same way as you. But then I realized that I didn't have enough knowledge of the language to actually get anywhere. So then I started reading the guide, coding small programs as I went along to consolidate what I was learning.