Using BWSAL with BWAPI JBridge

Posted by pek on Stack Overflow See other posts from Stack Overflow or by pek
Published on 2010-05-04T22:05:56Z Indexed on 2010/05/04 22:08 UTC
Read the original article Hit count: 313

Filed under:
|
|

I've been busting my head to find out how to use BWSAL with JBridge... I just can't figure it out.. I'm not that good in C++.. The best I could do is compile the latest JBridge from the repo... But I can't seem to get BSWAL working...

What do I need?

Compiling JBrigde doesn't seem to have BWSAL in.. I found the directory that BWSAL exists but there is no solution file to build.. I downloaded the latest BWSAL, found the solution file, but have no idea what to do... Compiling it will create an AIModule.dll but if I use this, the JBridge won't work...

What I'm trying to do is to simply use BuildingPlacer.getBuildLocationNear... Whenever I call this method a NullPointerException is thrown:

java.lang.NullPointerException at org.bwapi.bridge.model.Game.canBuildHere(Game.java:286)
at org.bwapi.bridge.sal.BuildingPlacer.canBuildHere(BuildingPlacer.java: 46)
at org.bwapi.bridge.sal.BuildingPlacer.canBuildHereWithSpace(BuildingPlacer.java: 60)
at org.bwapi.bridge.sal.BuildingPlacer.getBuildLocationNear(BuildingPlacer.java: 121)
at com.pekalicious.starplanner.ResourceManager.isInitialReady(ResourceManager.java: 87)
at com.pekalicious.starplanner.ResourceManager.update(ResourceManager.java: 37)
at com.pekalicious.starplanner.StrategicManager.update(StrategicManager.java: 51)
at com.pekalicious.starplanner.StarPlannerBridgeBot.onFrame(StarPlannerBridgeBot.java: 36)

How do I make this work?

I really need this.. Please.

Thank you.

© Stack Overflow or respective owner

Related posts about bwapi

Related posts about bwsal

  • Using BWSAL with BWAPI JBridge

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I've been busting my head to find out how to use BWSAL with JBridge... I just can't figure it out.. I'm not that good in C++.. The best I could do is compile the latest JBridge from the repo... But I can't seem to get BSWAL working... What do I need? Compiling JBrigde doesn't seem to have BWSAL… >>> More