MMOMinion
Code is crashing the bot - Printable Version

+- MMOMinion (https://www.mmominion.com)
+-- Forum: FFXIVMinion (https://www.mmominion.com/forumdisplay.php?fid=87)
+--- Forum: [DOWNLOADS] Addons, Lua Modules, Navigation Meshes.. (https://www.mmominion.com/forumdisplay.php?fid=90)
+---- Forum: I Need Help with LUA coding! (https://www.mmominion.com/forumdisplay.php?fid=104)
+---- Thread: Code is crashing the bot (/showthread.php?tid=10240)



Code is crashing the bot - Miter - 12-27-2014

Hello,

I'm working on creating a module that will help with the fishing achievements, but I'm stuck against a problem where the bot just crashes when I try calling my "getAvailableFish()" function from the console.

I have a local copy too that works and runs outside the bot, but when I load the bot it just crashes. I'm using the socket module so I can hit a webservice, and I'm thinking that might be where the root problem is..

I'm hoping someone could give me a little insight, I'm pretty new to lua in general and the code isn't the cleanest but I've attached what I have so far.

Any help would be greatly appreciated.

Thanks!


RE: Code is crashing the bot - Miter - 12-27-2014

I don't know how to use the debug log, but I was able to figure out the problem line.

local url = "http://en.ff14angler.com/skywatcher.php?name=1"
local content = ""; --http.request(url)

It crashes on http.request(url)


RE: Code is crashing the bot - Miter - 12-28-2014

I decided to just popen an exe to get around the socket issue for now. Ideally I wouldn't have to do that, but I can't figure out how to get socket in without crashing the client.