PyAI
- 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
Ok i see what you are talking about, yeah ESYT 0028 loop does get passed my warnings, i'll see if I can come up with a way to catch that for the next version. Thanks!
Also, the part about ESYT 0000 not being referenced is because; its not referenced. You are trying to compile the script on its own, and ANOTHER script is the only thing that references that label (an external jump). To get it to work correctly you need to compile both scripts at the same time.
Also, the part about ESYT 0000 not being referenced is because; its not referenced. You are trying to compile the script on its own, and ANOTHER script is the only thing that references that label (an external jump). To get it to work correctly you need to compile both scripts at the same time.
- Xerxes
- Posts: 43
- Joined: Wed Dec 24, 2008 9:38 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
You're very welcome!
Yes, I realize ESYT 0000 is not referenced in that example and the reference comes from an external file which wasn't compiled with it, but I was wondering if the error report was legitimate. As I explained in the PM I wasn't sure if the AI script continues reading off the starting block down into the script, of if it *requires* a GOTO or MULTIRUN label to get to any of the labels.
So what I was asking is, if the AI continues reading down the script from label to label with no stop() command in its way, then isn't 0000 actually used even if it isn't referenced?
Yes, I realize ESYT 0000 is not referenced in that example and the reference comes from an external file which wasn't compiled with it, but I was wondering if the error report was legitimate. As I explained in the PM I wasn't sure if the AI script continues reading off the starting block down into the script, of if it *requires* a GOTO or MULTIRUN label to get to any of the labels.
So what I was asking is, if the AI continues reading down the script from label to label with no stop() command in its way, then isn't 0000 actually used even if it isn't referenced?
- 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
- Xerxes
- Posts: 43
- Joined: Wed Dec 24, 2008 9:38 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
Oh, I see - no, I incorrectly assumed if another part of the script could flow into a label freely, it wouldn't count the label as unused, and thus if PyAI said a label was unused it would actually remove the entire section within that label since it was neither referenced nor flowed into.
I assumed this because even if the label isn't actually used, the developer might be using it to help identify certain sections of the code so it's easier to manage, and they might not want it removed on import so that it's intact later if they have to export it and lost their source code. It's fine like this though, now that I'm clear on what exactly is being removed. My bad!
I assumed this because even if the label isn't actually used, the developer might be using it to help identify certain sections of the code so it's easier to manage, and they might not want it removed on import so that it's intact later if they have to export it and lost their source code. It's fine like this though, now that I'm clear on what exactly is being removed. My bad!
-
- Posts: 36
- Joined: Fri May 11, 2007 12:56 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
- 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
Glad to see another new user 
First of all, there is an unfortunate bug in the current released version of PyAI, its already fixed for the next release, but until that goes public you must go to download the patch.
For the unitdef.ini, PyAI doesn't NEED the unitdef, you can load your mods TBL file (button with icon that has a file with TBL on it, or Ctrl+T) and use the unit names straight from there. If you want to use the names you used from your SCAIEdit unitdef.ini, then you can either create a custom TBL with your units names replaced with the ones from the unitdef.ini, or you can make a PyAI compatible unitdef by copying the format of unitdef.txt which came with PyMS. PyAI is not limited to one unitdef file, you just got to make sure to load your unitdef into the External Definitions manager (button with icon that has a file with X=Y on it, or Ctrl+X). If you need some help converting it you can post up your unitdef.ini and I will convert it to PyAI format for you.
Also, since you are changing a script from SCAIEdit to PyAI, you will want to use the "Compile SCAIEdit to PyAI" feature in the Script Editor to ensure all of your block names are saved (you don't want to have to deal with funky "PMCx 0001" names for your blocks). Open your aiscript.bin in both PyAI and SCAIEdit, then open the script (or scripts) you want to transfer in SCAIEdit, and open the Script Editor in PyAI (Ctrl+E). Paste the code from SCAIEdit into the Script Editor then hit the "Compile SCAIEdit to PyAI" button (File with gears icon on the right of the toolbar, or Ctrl+Alt+P), then you can save the script to your hard drive in the PyAI format.
If you have any questions dont hesitate to ask!

First of all, there is an unfortunate bug in the current released version of PyAI, its already fixed for the next release, but until that goes public you must go to download the patch.
For the unitdef.ini, PyAI doesn't NEED the unitdef, you can load your mods TBL file (button with icon that has a file with TBL on it, or Ctrl+T) and use the unit names straight from there. If you want to use the names you used from your SCAIEdit unitdef.ini, then you can either create a custom TBL with your units names replaced with the ones from the unitdef.ini, or you can make a PyAI compatible unitdef by copying the format of unitdef.txt which came with PyMS. PyAI is not limited to one unitdef file, you just got to make sure to load your unitdef into the External Definitions manager (button with icon that has a file with X=Y on it, or Ctrl+X). If you need some help converting it you can post up your unitdef.ini and I will convert it to PyAI format for you.
Also, since you are changing a script from SCAIEdit to PyAI, you will want to use the "Compile SCAIEdit to PyAI" feature in the Script Editor to ensure all of your block names are saved (you don't want to have to deal with funky "PMCx 0001" names for your blocks). Open your aiscript.bin in both PyAI and SCAIEdit, then open the script (or scripts) you want to transfer in SCAIEdit, and open the Script Editor in PyAI (Ctrl+E). Paste the code from SCAIEdit into the Script Editor then hit the "Compile SCAIEdit to PyAI" button (File with gears icon on the right of the toolbar, or Ctrl+Alt+P), then you can save the script to your hard drive in the PyAI format.
If you have any questions dont hesitate to ask!
- 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
-
- Posts: 36
- Joined: Fri May 11, 2007 12:56 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
allright thanks, i'll try that out.
but I do have a question (not sure wether it has been said and dealt with btw)
I loaded my ai just plainly into PYAI I saw it took the names of the original unit so that indeed is not a problem, but because PYAI should be better at bug ckecking created ai's I thought, hell let's try and see wether SCAIedit can't find something PYAI can.
so I hit the check button (v) thingy.
then I got this message:
but I do have a question (not sure wether it has been said and dealt with btw)
I loaded my ai just plainly into PYAI I saw it took the names of the original unit so that indeed is not a problem, but because PYAI should be better at bug ckecking created ai's I thought, hell let's try and see wether SCAIedit can't find something PYAI can.
so I hit the check button (v) thingy.
then I got this message:
- 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
[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 11 guests