CanAdv -- check whether you can adventure at a given location

Just where this is out there:

I upgraded to the official builds of mafia 13.9 and zlib 15. This killed canadv .6 with the error "Function 'error( string )' undefined (canadv.ash, line 38)". Upgrading to canadv .62 fixed it.
 
That's because zlib 14 had a function called error() which was removed in zlib 15 and in the current version of canadv.
 
I'm getting this error with the latest build 8285, when running Farm.ash


No adventuring in Typical Tavern
Considering Friar's Gate:
Considering 8-Bit Realm:
Considering Whitey's Grove:
Considering White Citadel:
can_adv reports that the area is unadventure-able.
Considering Black Forest:
Considering Bat Hole Entryway:
Considering Guano Junction:
Checking resistance to stench...
Searching items for stench resistance...
Resistance-granting item found: distressed denim pants
Considering Batrat and Ratbat Burrow:
Considering Beanbat Chamber:
Considering Boss Bat's Lair:
Begin index 0 greater than end index -1 (canadv.ash, line 147)
 
Had the same problem as the two above posts, using farm.ash with the newest build, also tried 8283 and 8282, then reverted to the build I was using yesterday, which was functional.
 
It would appear that to_url($location[Boss Bat's Lair]) used to contain a '&', and now it doesn't. Replace line 147 with:
return (perm_urlcheck("bathole.php",to_url(where)));
 
Stupid question - I open this up in notepad - is there another program I can open it up in that will show me what line 147 is?

Thanks!
 
Stupid question - I open this up in notepad - is there another program I can open it up in that will show me what line 147 is?

Thanks!
If you use Notepad, and make sure Format->Word Wrap is unchecked you can go to a specific line number using Edit->Go To, entering the line number and then "OK". Ctrl+G is the shortcut.
 
having a problem with the bugbear pens - farm.ash keeps going there - tried everything to get it to stop - bar manual farming...
 
That's a farm.ash problem. Nothing wrong with canadv, unless you cannot actually adventure there.
 
The issue is that I can adventure there - I just don't want to. I thought that farm called canadv to find areas available?
 
And canadv did find that the bugbear pens were available. It worked perfectly.

It was farm.ash which decided you would want to do that. Complain to dj_d.
 
Just popping in to update on the fact that the Nemesis zones are not in canadv, as well as the newest mapzones (Kegger in the woods and Jackington).
 
Suggested changes to the current Hippy Camp & Frat House.

Current:
Code:
case $location[Hippy Camp]:
case $location[Frat House]: return (itemcheck($item[dingy dinghy]) && get_property("warProgress") == "unstarted");
Suggested changes:
Code:
case $location[Hippy Camp]: return (itemcheck($item[dingy dinghy]) && get_property("warProgress") != "started" && get_property("sideDefeated") != "hippies" && get_property("sideDefeated") != "both");
case $location[Frat House]: return (itemcheck($item[dingy dinghy]) && get_property("warProgress") != "started" && get_property("sideDefeated") != "fratboys" && get_property("sideDefeated") != "both");
Currently, if you defeat only one side of the army canadv reports the other side is inaccessible even though it is.
 
I'm getting an error that is crippling me, I tried some things to fix it but I'm not much of a coder in truth. Before it aborts, it says:

"Begin index 0 greater than end index -1 (canadv.ash, line 146)"

It seems to be a problem I am having with this script, but I was running farm.ash if that is relevent.
 
Since line 146 is just a closing brace, but line 147 has a substring() somewhere, I'm going to just guess that a line's missing (possibly the notify).
PHP:
return (perm_urlcheck("bathole.php",substring(to_url(where),0,index_of(to_url(where),"&"))));

That line's always been a bit screwy, since $location[Boss Bat's Lair].to_url() returns adventure.php?snarfblat=34. Possibly a Mafia change along the way? I'm not entirely sure, but either way, just replace that line with
PHP:
return (perm_urlcheck("bathole.php", to_url(where)));
 
Back
Top