Author Topic: Game crashes after inserting bindings.  (Read 1325 times)

Offline Merrick

  • *
  • Posts: 2530
  • Rep: 3
  • Half-decent IRL designs and terrible antweights.
  • Awards BOTM Winner
    • View Profile
    • Awards
Game crashes after inserting bindings.
« on: August 29, 2013, 08:24:27 AM »
Ok, basically I started AI'ing last night, it all went fine, got my first robot (a 'chopper') into the game and it ran smoothly.

But then I tried again with a second robot (a 'flipper') and now the game crashes every time I boot it up.  :confused:

Is there any routine stuff I need to check that I might have missed out?

Offline Shield

  • The question isn't who will let me.
  • Ultra Heavyweight
  • Posts: 2196
  • Rep: 8
  • It's who will stop me.
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #1 on: August 29, 2013, 09:13:15 AM »
Perhaps the binding? Always make sure the robot is In the right team with the right bindings, if its not that, perhaps it's the robot's name. Make sure that it is correct, space for space.
beep beep

Offline Merrick

  • *
  • Posts: 2530
  • Rep: 3
  • Half-decent IRL designs and terrible antweights.
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #2 on: August 29, 2013, 09:20:13 AM »
It's in the right team and the binding is put in the right place in the .py file, next to the first robot in the team.

Having checked back, I realise I didn't make it a flipper, but instead a poker. Basically, I copied Chaos 2's bindings for my own, as it's basically the same kind of design.

Would that make a difference? I mean, I copied Dominator 2's bindings for the hammerbot and that didn't make a difference. I'm really confused as to what I've done wrong.

Offline 090901

  • alcoholic in denial
  • *
  • Posts: 7005
  • Rep: 22
  • :mrgreen:
  • Awards Donated money for site hosting 2019 GTMCS2 Divison Winner GTMCS Division Winner
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #3 on: August 29, 2013, 09:23:55 AM »
It does not matter where the binding line.
Can you post the binding line? It's hard to help without seeing it first.

Offline Impossible343

  • Beetleweight
  • Posts: 135
  • Rep: 1
  • 5?
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #4 on: August 29, 2013, 09:30:43 AM »
Make sure that the robot name in the binding matches EXACTLY to the one in the .bot file.

This option might sound stupid but it has resolved quite a few of my AI'ing problems. what you could try is putting your cursor at the end of the bindings like this:


then save it and try booting up the game.

Hope this helps

Impossible
Sometimes this game is on crack.
and now craaig knows how sakurai felt

Offline Merrick

  • *
  • Posts: 2530
  • Rep: 3
  • Half-decent IRL designs and terrible antweights.
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #5 on: August 29, 2013, 09:41:04 AM »
Can you post the binding line? It's hard to help without seeing it first.

Of course.



I now know for a fact it's the binding line because if I delete it, the game runs fine. I just can't see a mistake in there.

Offline Fracture

  • Super Mega Hyper Giga
  • Ultra Heavyweight
  • Posts: 1506
  • Rep: 11
  • how about i shove my big dog up your hanky panky
  • Awards GTMCS2 Divison Winner BOTM Winner
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #6 on: August 29, 2013, 11:26:36 AM »
I see no problem in the bindings, unless your bot has less than 8 components on it? There might be too many binding lines in the file, like one team has seven bindings instead of six or something. I don't see why else deleting that line fixes the problem. It could also be a problem with Omni.py itself, but that's unlikely if there are other bots in the bindings that use Omni. One last suggestion would be to double-check the bot itself, making sure it doesn't have any components that your copy of the game doesn't and that the controls/smartzones are all there and wired correctly.

Offline 090901

  • alcoholic in denial
  • *
  • Posts: 7005
  • Rep: 22
  • :mrgreen:
  • Awards Donated money for site hosting 2019 GTMCS2 Divison Winner GTMCS Division Winner
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #7 on: August 29, 2013, 01:14:06 PM »
There might be too many binding lines in the file, like one team has seven bindings instead of six or something.
Like I said earlier, RA2 does not care where they are. Just open up the Stock AI bindings, there are no teams or anything in them and all the binding lines are in alphabetical order.
Anyways, make sure there is 4 spaces infront of the binding lines as sometimes it gets messed up when to copy paste.

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: Game crashes after inserting bindings.
« Reply #8 on: August 29, 2013, 01:27:04 PM »
Maybe the bot's name has a space at the end?  That's happened to me before.  The only thing I can think of is that you did some sort of imporper line break, which sometimes happens.  Do you see a red minus sign like this on the left side? http://postimg.org/image/njd18q3cl/68ad06ac/


I'd just delete the broken binding ans start fresh; keep the text stored somewhere so you can put the important parts back in.  Also, use Postimage, not Photobucket.

Offline Merrick

  • *
  • Posts: 2530
  • Rep: 3
  • Half-decent IRL designs and terrible antweights.
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #9 on: August 29, 2013, 01:31:53 PM »
Cheers for the responses, guys. I'm out at the moment but when I get home I'll test out some of the ideas and see if anything works.

One thing though, on the subject Fracture bought up, what does the 8 after 'weapon' actually mean? I copy/pasted it from another binding and don't actually know. Could go a log way to helping my understanding of what's gone wrong.

Offline Badger

  • Permanent Artifact
  • Giga Heavyweight
  • Posts: 6318
  • Rep: 3
  • I wish to be with my people
  • Awards BOTM Winner Donated money for site hosting 2019
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #10 on: August 29, 2013, 01:39:41 PM »
One problem with one of my python scripts was that some of the tabs had magically been converted into spaces. I never use spaces to indent so it must have been Notepad ++. Check all the indenations, they must all be spaces or all tabs. If you copy/paste into Python IDLE, you can un-tabify or tabify all the indentations automatically, which is much quicker than checking.
also lol at most toxic guy around calling others out on this sh**
Google Drive with my newer bots

Offline Virus Bomb

Re: Game crashes after inserting bindings.
« Reply #11 on: August 29, 2013, 01:41:17 PM »
the numbers after 'weapon' are the ids of components on the bot that it uses for weapons. if they all break off, the bot's ai switches to pusher.py iirc. you have to download apanx's bot exporter to find the component ids.

Offline Fracture

  • Super Mega Hyper Giga
  • Ultra Heavyweight
  • Posts: 1506
  • Rep: 11
  • how about i shove my big dog up your hanky panky
  • Awards GTMCS2 Divison Winner BOTM Winner
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #12 on: August 29, 2013, 01:41:29 PM »
Cheers for the responses, guys. I'm out at the moment but when I get home I'll test out some of the ideas and see if anything works.

One thing though, on the subject Fracture bought up, what does the 8 after 'weapon' actually mean? I copy/pasted it from another binding and don't actually know. Could go a log way to helping my understanding of what's gone wrong.
That bracket ideally contains the list of component IDs corresponding to the weapons on the bot. IDs are assigned in the order that components are attached, starting with 1, as the chassis is always component 0. In your binding line, the 8th component that was attached on the bot should be its only weapon if the AI is correct. When any bot loses all the components listed after 'weapons':, I think it automatically switches to a pusher AI or something like that.

I was thinking that your game might crash because the bindings say that component #8 is a weapon, but there is nothing to match it up with if the bot only has 7 or less components.

Edit: Hi VB

Offline Badger

  • Permanent Artifact
  • Giga Heavyweight
  • Posts: 6318
  • Rep: 3
  • I wish to be with my people
  • Awards BOTM Winner Donated money for site hosting 2019
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #13 on: August 29, 2013, 02:12:37 PM »
@Fracture Could be 8 or less, the game probably indexes from 0.
also lol at most toxic guy around calling others out on this sh**
Google Drive with my newer bots

Offline Merrick

  • *
  • Posts: 2530
  • Rep: 3
  • Half-decent IRL designs and terrible antweights.
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Game crashes after inserting bindings.
« Reply #14 on: August 29, 2013, 04:32:20 PM »
Maybe the bot's name has a space at the end?  That's happened to me before.  The only thing I can think of is that you did some sort of imporper line break, which sometimes happens.  Do you see a red minus sign like this on the left side? http://postimg.org/image/njd18q3cl/68ad06ac/


Sorted. That's what the problem was.

Cheers, everyone.



<3 u resetti xoxoxox