PyAI Corrupts My Scripts

Help - Resources - Discussion
[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
pastelmind
Posts: 57
Joined: Fri Nov 19, 2010 7:50 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

PyAI Corrupts My Scripts

Postby pastelmind » Sun Jan 09, 2011 1:17 am

So I'm using Windows 7 Korean with Python 2.6 and PIL, and attempting to create an AI script that works with a custom stat_txt.tbl. Opening and reading AI scripts works fine with both the script version and the EXE version of PyAI. However, after I modify and save a script (e.g. Terran Expansion Custom Level), many of the labels (e.g. TMCx 0026) are converted to TMCx 0000. Thus, trying to edit and save the script a second time results in a "multiple labels found" error. Could this be an encoding/compatibility issue?
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 09, 2011 3:58 pm

It definitely could be since I've never tested any of the programs on Windows 7 (let alone one thats not an english version), or using Python 2.6 (I used 2.5.4 for all my development/usage). Its also possible that its a bug, something like that has happened in earlier versions but should be fixed. Try re-arranging your blocks and/or adding/removing blocks and see if you get better results. Also, what happens when you open one of the default scripts and try and save it with no modifications?
pastelmind
Posts: 57
Joined: Fri Nov 19, 2010 7:50 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 pastelmind » Mon Jan 10, 2011 11:10 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 » Mon Jan 10, 2011 4:48 pm

pastelmind
Posts: 57
Joined: Fri Nov 19, 2010 7:50 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 pastelmind » Wed Jan 12, 2011 1:21 am

[quote name='poiuy_qwert' post='9957' date='Jan 11 2011, 01:48 AM']Oh, another thing to try; if you are saving with extra information, try without. Its the button on the toolbar, in both the script editor and main window, that's icon is a disk with +i on it. Make sure that it is not pressed in when saving, that might fix the problem.[/quote]

That seems to solve the problem. Thanks!
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 » Sat Sep 10, 2011 11:28 pm

I'll be honest. I usually have all the scripts saved as .txt files and import/export as needed, since the labels seem to be a frequent problem and I absolutely need the extra information, otherwise I can't read my own scripts. ;)

Edit: Yikes, this thread is old. :S

[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
[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 4 guests