ID:141334
 
Code:
//1
while(1)
for(var/mob/M in world)
M.moveCount+= 1
sleep(1)

//2
obj/aPotato
Click()
set src in view(0)
..()
usr.Move(src)
verb/Do_Potato_Stuff()
//potato stuff here


Problem description:
1. Since the last few updates of BYOND M.moveCount has stopped going up, that piece of code used to work fine but I'm guessing while(1) no longer works as an infinite loop or something?

2. This code also got broken in the last couple of BYOND updates. You used to be able to click to go inside the object and still access the verb inside the object as well as outside, but now you can't access the verb from inside the object, only outside.

Is there any way I can fix these two problems?
Sprin wrote:
1. Since the last few updates of BYOND M.moveCount has stopped going up, that piece of code used to work fine but [...]

We need to actually see where that code is and when it's being called to be able to tell whether it should work or not. The code could be fine but not in the right place or some of the other code in the same procedure is preventing it from functioning, etc. Did you add debug output lines to make sure the loop is reached and as such?

I'm guessing while(1) no longer works as an infinite loop or something?

Nah, I don't think so, though you could use for() instead anyway. ;P

You used to be able to click to go inside the object and still access the verb inside the object as well as outside, but now you can't access the verb from inside the object, only outside.

This depends on the verb's src setting - which you've also omitted in your post (or if you used none, then it uses the default, which indeed would cause this). BTW, I noticed you've used the src setting in Click() - it has no effect there and is useless, because the src setting is only relevant for actual verbs (or procs that are used as verbs by being added to a verbs list). You'll want to check
I believe the term while(world) works if you would like to try that one...
In response to Kaioken (#1)
Oh right, sorry. Code 1 is a proc which gets called on world/New() that's all it does, calls the proc to start the infinite loop and then adds to that variable.

For code 2 I defined src as
set src in view(1)

It used to work and then just stopped I didn't change anything to that code and it just stopped working for inside the object.

Also, I used src as the obj that was Click()'d so it goes inside src, which is what was clicked and it seems to work for me.
In response to Pirion (#2)
Thanks I think I figured out the infinite loop problem. Either it was something I did or something BYOND updates did but it used to freeze everything until it had finished loading the world on startup, now it lets you access tabs and everything while it's loading but the code isn't running properly yet so it hasn't even started the infinite loop.

EDIT: I don't know what's going on but I just ran it with while(world) instead and it works fine as soon as you start the game, it doesn't even lag while loading startup which used to freeze everything, I guess they must have fixed a bottleneck in BYOND somewhere. Or maybe my code is having a breakdown haha
In response to Sprin (#3)
I just did some debugging and I found out that it doesn't even call the verb when you click it.

It shows up in the list of verbs for the object when you right click it but when you click the actual verb it doesn't do anything!

Edit:
When I say it doesn't do anything, I mean it doesn't even do world << "hi", unless your character is 'outside' the object. Once it moves 'inside' though, the verb does nothing. It shows up in the list of verbs but doesn't work, this is so frustrating I'm sure it's a byond bug because it used to work and I havn't changed it