Is there a way to clear cache before running code?


#1

Ugh, I’m pretty sure something is not right with Naria related code (envenom/hide) but that’s not what I’m asking about…

In trying to debug, I’ll often make one change and run it again (it’s a repeated level, so submit is not possible). After I click run, I’m not sure what is happening but in many cases it clearly is running some mix of old and new code, because I might have a “say” in there and it will execute even after I delete the line and click run.

Just me? Is there anything I can do except just hitting “run” over and over again until it seems to run the latest version of code? Although unfortunately when I do that by the time it seems to be running the latest code version it’s also in fast forward mode and I can’t tell what is happening!


#2

Try cutting out all your code running then pasting your code back in then run again


#3

Yeah, it’s a good suggestion, just hoping something could be done behind the scenes to make this automatic. Seems like it wouldn’t be that hard to automatically flush the cache or reload the latest code when you hit the “run” button. I think that’s how it works with the submit button as I’ve never noticed this problem with the “submit” button. But again, not an option on the repeatable levels where you can only submit once a day.


#4

It sounds like it might be due to a bug with envenom stalling out the game engine. Do you see any error messages in the JS console when it’s doing this, maybe something with a stack trace pointing to the envenom skill?


#5

I’m not very familiar with the java console (beyond opening it up). The current code is for Sarven Treasure. It seems to hang on a “move” line but the JS console does mention envenom (pasted below) I’m done for the night, so you can grab my full code from there if you want to check it. It is a mess though, as I was experimenting with “hide” to get to the headhunter.

|Wepwawet’s Woodhouse| Non-UserCodeError: TypeError: Cannot read property ‘slice’ of undefined
TypeError: Cannot read property ‘slice’ of undefined
at t.Envenoms.update (eval at (http://codecombat.com/javascripts/world.js:327:20), :71:34)
at t.e.exports.t.callChainedMethod (http://codecombat.com/javascripts/world.js:220:191)
at t.r [as update] (http://codecombat.com/javascripts/lodash.js:50:27)
at Existence.update (eval at (http://codecombat.com/javascripts/world.js:327:20), :70:15)
at t.e.exports.t.getNextFrame (http://codecombat.com/javascripts/world.js:389:100)
at World.module.exports.World.getFrame (http://codecombat.com/javascripts/world.js:291:52)
at World.module.exports.World.loadFrames (http://codecombat.com/javascripts/world.js:300:10)
at http://codecombat.com/javascripts/world.js:297:172


#6

Fixed it; envenom should be working again now. Now, it might be underpowered or overpowered, I don’t know, so let me know how you find the strategic balance.


#7

Thanks, NIck, envenom seems to work much better now.

I’m not sure what is underpowered or overpowered, but can relay this. With headhunter at 180 health (Sarven Treasue 3):

  1. envenom + 1 throw (razordisc) kills the headhunter (after a few seconds)
  2. envenom + 1 attack (lightning stick) doesn’t do much and I don’t think the envenom adds anything in this case

Hide is pretty cool, btw, although it takes me several lines to make it do something useful (i.e. hide, move near headhunter for about 4 seconds, then attack)


#8

Hmm, I’ll have to check whether envenom works with the lightning stick.

Hide would be most useful in that scenario if you used it to backstab the Headhunter with a backstab dagger.


#9

One would expect it not to work . . . how is it that one puts venom on lightning? (razor disks, arrows, blades sure, lighting? magic bolts? might as well work on haste :smile: )


#10

@nick – hide also helps because headhunter is behind all the others so if you want to attack the headhunter, then hide+move basically lets you move through all the ogres and such without getting beat to a pulp. At least, that’s how I used it.

@vlevo – a fair point. The description just says “adds poison to the next attack”, nothing more specific than that. All I can say from experience is that it does seem to add damage to the razordisc but not the lightning stick. I think it might have worked with one of the crossbows too but my memory is hazy there.