bordemstirs
Member
I cannot for the life of me figure out what exactly I'm doing wrong, but I'm having trouble in a few places where visit_url isn't returning anything, no matter how I call it.
Where bev is just a number in a string (for instance, 6512)
For testing, I don't have the drink, but when I make a link and click it with exactly that format, I get a "You don't have that item" page along with inventory. Via visit_url(), however, I get no result of any kind.
For what it's worth, this is in a relay script (custom, not override).
I've tried it without manually entering the hash, and with, and even with it in other spots amongst the parameter (the wiki suggests that pwd as the first parameter doesn't get auto-filled in by the interpreter)
I also had this problem with using Instant Karma, but I just gave up on gathering the result and used this ugly gem:
So, the "equivalent" in CLI works, but not with visit_url().
Code:
string p="inv_booze.php?pwd="+my_hash()+"&which=1&whichdrink="+bev;
string res=visit_url(p);
res=visit_url(p,false,false);
res=visit_url(p,true,true);
res=visit_url(p,false,true);
For testing, I don't have the drink, but when I make a link and click it with exactly that format, I get a "You don't have that item" page along with inventory. Via visit_url(), however, I get no result of any kind.
For what it's worth, this is in a relay script (custom, not override).
I've tried it without manually entering the hash, and with, and even with it in other spots amongst the parameter (the wiki suggests that pwd as the first parameter doesn't get auto-filled in by the interpreter)
I also had this problem with using Instant Karma, but I just gave up on gathering the result and used this ugly gem:
Code:
while(item_amount($item[Instant Karma])>0)cli_execute("text inventory.php?which=1&action=discard&pwd&whichitem=4448");