AndreyAndreich
Member
- Joined
- Sep 16, 2014
- Messages
- 131
- Reaction score
- 0
Нет такой позиции - "руда" ) Нужно точное название
lypnn, doesnt work in RU server
HTML:10:11 ERROR System.NullReferenceException в OpenAuctionHouse.OpenAuctionHouse.buyFromAuctionHouse(String mySearchText, Int32 maxprice, Int32 minamount) в f:\Games\archebuddy\Plugins\auc\auc.cs:строка 76 в OpenAuctionHouse.OpenAuctionHouse.PluginRun() в f:\Games\archebuddy\Plugins\auc\auc.cs:строка 41 Ссылка на объект не указывает на экземпляр объекта. 10:11 > ----- Open Auction House stopped -----
under ////////// no variables to edit below this line ///////////// i nothing change.
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace DefaultNameSpace{
public class DefaultClass : Core
{
public static string GetPluginAuthor()
{
return "lyp";
}
public static string GetPluginVersion()
{
return "1.0.0.0";
}
public static string GetPluginDescription()
{
return "test Auction House functionality";
}
//Call on plugin start
public void PluginRun()
{
string mySearchText = "руда";
try
{
AuctionRequestParams req = new AuctionRequestParams(AuctionCategory.Off, 0, 0, mySearchText, false, ItemGrade.Common, AuctionSortType.Time, ArcheBuddy.Bot.Classes.SortOrder.Asc);
List<AuctionItem> items = getAuctionBuyList(req, 0);
Log(items.Count + " listings for " +mySearchText +" retrieved from AH successfully");
}
catch(Exception e)
{
if(e.GetType() != typeof(System.Threading.ThreadAbortException))
{
Log(DateTime.Now.ToShortTimeString() + " ERROR " +e.GetType().ToString() +" " +e.StackTrace);
Log(e.Message);
}
}
}
//Call on plugin stop
public void PluginStop()
{
}
}
}
Thread: Open Auction House Bot
steals others work
warling
Okay! This 76 lineHi acmodey, it will not be easy to help you because I have no RU version to test.
Can you post line 76 of your code, which is causing the NullReferenceException?
Please run this testcode with the RU version and tell if you also get an error:
Code:using System; using System.Drawing; using System.Windows.Forms; using System.Threading; using System.Collections.Generic; using System.Linq; using ArcheBuddy.Bot.Classes; namespace DefaultNameSpace{ public class DefaultClass : Core { public static string GetPluginAuthor() { return "lyp"; } public static string GetPluginVersion() { return "1.0.0.0"; } public static string GetPluginDescription() { return "test Auction House functionality"; } //Call on plugin start public void PluginRun() { string mySearchText = "руда"; try { AuctionRequestParams req = new AuctionRequestParams(AuctionCategory.Off, 0, 0, mySearchText, false, ItemGrade.Common, AuctionSortType.Time, ArcheBuddy.Bot.Classes.SortOrder.Asc); List<AuctionItem> items = getAuctionBuyList(req, 0); Log(items.Count + " listings for " +mySearchText +" retrieved from AH successfully"); } catch(Exception e) { if(e.GetType() != typeof(System.Threading.ThreadAbortException)) { Log(DateTime.Now.ToShortTimeString() + " ERROR " +e.GetType().ToString() +" " +e.StackTrace); Log(e.Message); } } } //Call on plugin stop public void PluginStop() { } } }
foreach (AuctionItem item in items)
Yes, i have problems adding more items to search...
Ive tried once, it worked...but when ive added 10 more, its not doing it.
Okay! This 76 line
PHP:foreach (AuctionItem item in items)
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace DefaultNameSpace
{
public class DefaultClass : Core
{
public static string GetPluginAuthor()
{
return "lyp";
}
public static string GetPluginVersion()
{
return "1.0.0.0";
}
public static string GetPluginDescription()
{
return "test Auction House functionality";
}
//Call on plugin start
public void PluginRun()
{
string mySearchText = "руда";
try
{
AuctionRequestParams req = new AuctionRequestParams(AuctionCategory.Off, 0, 0, mySearchText, false, ItemGrade.Common, AuctionSortType.Time, ArcheBuddy.Bot.Classes.SortOrder.Asc);
List<AuctionItem> items = getAuctionBuyList(req, 0);
if (items != null)
{
Log(items.Count + " listings for " + mySearchText + " retrieved from AH successfully");
}
else
{
Log("Lasterror: " + GetLastError().ToString());
}
}
catch (Exception e)
{
if (e.GetType() != typeof(System.Threading.ThreadAbortException))
{
Log(DateTime.Now.ToShortTimeString() + " ERROR " + e.GetType().ToString() + " " + e.StackTrace);
Log(e.Message);
}
}
}
//Call on plugin stop
public void PluginStop()
{
}
}
}
Here's the line that ive messed it up.
...
Now if i can understand How the bot is biding (only from what ive set it up? lower then that? for how long it can go higher on bid, etc) would be amazing.
Thanks
Its very easy actually.lypnn how would i make it so it buys X item at X price. what do i need to change and wherE?