You need to be careful about indentation. You've been told several times that you need to indent code that goes inside of loops.
Further, I'd strongly recommend against Dreadnaught's approach. It's way overcomplicated for your needs. (No offense to Dreadnaught, of course)
Seijins I'd listen to Ter13, he knows what he's talking about.
(No offense taken I'm fairly new to dm, your criticism is always welcome @Ter13) |
Already fixed it myself before Ter13 responded, it works like a charm now, and even called it from another verb.
Thanks for the help. |
In response to Seijinz
|
|
Seijinz if you actually cared about gaining some new knowledge in regards to dm and learning how to optimize your code for better results you would have listened to Ter13's previous reply to me.
|
Why do people just want to make accusations towards me?
I do care about learning hence I am currently reading guides about how to go around and using lists, and certain vars... I won't respond to accusations from now on, if it's something similair what you just wrote, I will disregard it to prevent further pointless discussions. Now I am going to try and figure out, why it adds the mobs to the list, but summon only one... |
In response to Seijinz
|
|
Seijinz wrote:
Why do people just want to make accusations towards me? I'm surprised it'll even summon one o.o Seijinz wrote: Summon_SummonList() I believe this'll just produce an error o.o |
Currently I have it like this:
Add_Player_SummonList(mob/M in world) Which now summons all mobs I added to the list, infront of me, in quick succession, without errors, or lag... |
for(var/mob/M) would be much better as for(var/mob/M in SummonList) |
In response to Seijinz
|
|
Seijinz wrote:
Currently I have it like this: Add_Player_SummonList(mob/M in world) Which now summons all mobs I added to the list, infront of me, in quick succession, without errors, or lag... Congrats, a long three-verb Summon. I'm positive it wont create issues when other admins try to summon people >.> |
In response to Mightymo
|
|
Mightymo wrote:
> for(var/mob/M) would be much better as > for(var/mob/M in SummonList) Totally would. |
I'm just going to drop this thread here.
|
In response to Lige
|
|
In response to Lige
|
|
L.o.l. I've read that, hilarious read. Very spot on for this topic.
|
Ssj4 and Lige, so you're saying that going about things differently in code than the both of you, instantly makes anyone and everyone wrong?
I do agree that there might be a more sophisticated, more efficient, and elegant way of doing this. I am still learning however, and what Dreadnaught posted is something I understand better than Ter13. I am learning step by step, I will be working on a rewritten version more akin to what Ter13 suggested, but part of learning is playing around. You don't have to agree with me, as much as I don't have to agree with your visions. If you have a problem with the list being for everyone, is there a way I could make the list specific to that user? |
Probably because I started learning dm a whole five days ago. You should strive to optimize the code which in my opinion would have been listening to Ter13 and if you didn't understand something asking specific questions of him to further understand and better yourself. I've probably learned more than you from this topic.
|
In response to Seijinz
|
|
Seijinz wrote:
Ssj4 and Lige, so you're saying that going about things differently in code than the both of you, instantly makes anyone and everyone wrong? No. Read the thread, your comment makes you a perfect example of the kind of users Tiberath pointed out. I do agree that there might be a more sophisticated, more efficient, and elegant way of doing this. I am still learning however, and what Dreadnaught posted is something I understand better than Ter13. Doesn't make it any less wrong. You're learning, great, but you're learning poor methods ( no offense to Dreadnaught ) when Ter has spoon-fed you a more appropriate method. I am learning step by step, I will be working on a rewritten version more akin to what Ter13 suggested, but part of learning is playing around. Okay. You don't have to agree with me, as much as I don't have to agree with your visions. If you intend on doing things the wrong way, I can direct you to a number of poorly made tutorials and sources. If you have a problem with the list being for everyone, is there a way I could make the list specific to that user? Read Ter13's comments in this thread. |
In response to Seijinz
|
|
Seijinz wrote:
Ssj4 and Lige, so you're saying that going about things differently in code than the both of you, instantly makes anyone and everyone wrong? Steps for optimal solution: /* Enjoy. |
Does nothing to be fair :)
I thought it was the src.loc and src in SummonList so I tried to use for/var/mob/M to define it as mob and use M.loc instead. Now it gives me undefined var errors for them however.
Can someone point out what I am doing wrong, cause I don't really understand why it's not defined correctly, as well as why src in SummonList didn't work.