PyAI bug hunting

Help - Resources - Discussion
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Sun Jan 04, 2009 12:20 am

Sounds to me like it might be hardcoded. PyAI is compiling/decompiling it fine (or is it? is unit 227 the Terran Vespene Tank Type 2?), so it shouldn't be a PyAI problem. I'll look into it when I get home though.
User avatar
modmaster50
Posts: 72
Joined: Tue Oct 16, 2007 1:47 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby modmaster50 » Thu Jan 15, 2009 1:03 am

After trying to compile:
CODE
# stat_txt.tbl entry 0: Terran Marine<0>*<0>Ground Units<0>
TMCx(0, 101, aiscript):
start_town()
build(1, Terran Command Center, 150)
train(1, Terran Civilian)
build(2, Terran SCV, 80)
build(1, Zerg Lair, 60)
expand(1, TMCx 0001)
goto(TMCx 0000)


--TMCx 0000--
train(6, Terran Marine)
train(2, Terran Ghost)
train(3, Terran Vulture)
train(2, Terran Science Vessel)
train(3, Zerg Defiler)
train(1, Protoss High Templar)
train(1, Protoss Dark Archon)
train(2, Terran Medic)
attack_add(6, Terran Marine)
attack_add(2, Terran Ghost)
attack_add(3, Terran Vulture)
attack_add(2, Terran Science Vessel)
attack_add(3, Zerg Defiler)
attack_add(1, Protoss High Templar)
attack_add(1, Protoss Dark Archon)
attack_add(2, Terran Medic)
attack_prepare()
wait(500)

attack_do()
attack_clear()
stop()

--TMCx 0001--
start_town()
build(1, Zerg Lair, 120)
build(1, Terran SCV, 80)
defensebuild_gg(2, Terran Marine)
goto(TMCx 0000)


I get an error. It started appearing after I added the expand command.

ERROR:
CODE
Exception in Tkinter callback
Traceback (most recent call last):
File "C:Program FilesPythonliblib-tkTkinter.py", line 1403, in __call__
return self.func(*args)
File "C:Program FilesStarcraftToolsPyMSPyAI.pyw", line 968, in save
if self.parent.iimport(iimport=self, parent=self, extra=self.extrainfo.get()):
File "C:Program FilesStarcraftToolsPyMSPyAI.pyw", line 3406, in iimport
warnings = i.interpret(iimport, self.extdefs, extra)
File "C:Program FilesStarcraftToolsPyMSLibsAIBIN.py", line 1188, in interpret
if not notused and (id,label) in unused:
UnboundLocalError: local variable 'label' referenced before assignment
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Thu Jan 15, 2009 1:38 am

User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Wed Jan 21, 2009 8:20 am

Ok I've figured out a way to give patches for EXE users (though they are limited to updating only the backend). Just download and replace the Libs.zip file in the Libs folder to fix the PyAI bug.

Edit: Just to clarify, it says "replace the Libs.zip file in the Libs folder", do not extract the files from the new Libs.zip!
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Archon_Wing » Wed Jan 21, 2009 9:59 am

Hi,
replaced the libs.zip and now get the following message when i open any aiscript.bin
Load Error: Could not load units.dat file 'C:Program FilesPyMSwinEXELibsLibsDefaultunits.dat'
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Wed Jan 21, 2009 9:57 pm

Ah, remnants of the newer version are screwing with the paths. I updated the file so redownload ( so you dont have to scroll up) and it should work :X
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Archon_Wing » Thu Jan 22, 2009 2:49 am

Hmm, now the internal error is back again.
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby poiuy_qwert » Thu Jan 22, 2009 3:24 am

Are you sure its the same error? I don't seem to get it.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “PyMS (poiuy_qwert's complete modding suite)”

Who is online

Users browsing this forum: No registered users and 1 guest