Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PowerCell constant is wrong?
#1
Hi,

I am having an odd problem.. When editing CBot sources, the constant for PowerCell keeps coming up as the integer 5, instead of 34, as defined in the C++ source. This causes problems with things like radar(), as 5 is the value for the BotFactory. The reason this is really odd for me, is that the first time playing the game, I did not have this problem; radar( PowerCell ) seemed to work fine, and the only thing that I've changed since first installing ColoBot Gold was that I created a new player profile to play through the missions fresh from the start. Well, I also customized my player skin/colors, but I created yet a third profile with no customizations, and I also went back to my original profile -- The problem now exists in that profile as well -- All my CBot programs that worked before no longer work correctly.

I'm running on a Debian Linux system:
# uname -a
Linux caslt1-debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux

My original ColoBot installation (version 0.1.6-1 alpha according to apt, and simply 0.1.6-alpha on the ColoBot main menu screen) was via apt-get install colobot. After this problem occured, I have downloaded the sources via github and compiled them myself just hours ago, and the problem persists in the locally compiled version as well/ (This leads me to believe the problem is somewhere in my local setup/profile, which is why I'm coming here instead of filing a github bug report..)

Can someone please help me trace/debug this issue, and/or determine if it's a genuine bug?

Thanks.

Cas
#2
Are you sure you are not mixing up PowerCell with EnergyCell? The first one is category of an object (for radar(PowerCell)), the second is used as a parameter to grab/drop to tell the robot to pick up its own battery.
I just checked and EnergyCell is indeed defined as number 5, so this is probably it.
#3
*repeatedly bangs head on desk* Thank you, this indeed seems to have been the problem.. Looking through my editor's search/replace history, I did inadvertently switch EnergyCell and PowerCell in *all* my scripts, rather than just the one I was trying to fix.

PS: A big Thank You to the developers, for your hard work on ColoBot -- I've been using it to teach my nephew how to program, and it's been more handy than the classic "Hello, World!" style of teaching/learning!


Forum Jump:


Users browsing this thread: 1 Guest(s)