PyTRG.py

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 24, 2010 4:02 pm

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 24, 2010 6:39 pm

[quote name='bajadulce' post='9096' date='Jan 24 2010, 12:19 PM']I looked closer at this problem this morning as I was finally just too tired last night to look further into. Troubles like these are bitch to locate errors especially when after cutting the problem in half, both halves tested out ok.. :o But luckily for you I happen to be one of the best if not the best Trouble Shooting/Bug reporting peeps in the community.

Anywhoooo...

The error lies in
RunAIScriptAtLocation(TL0x, 1)

Both the numeral "0" and the letter "O" compile without errors as would probably any letters. ** I imagine that PyTrg is set up to allow users to import any custom script label they want. The Map editor however wants to see the Letter O not the number 0. :) Maybe a warning or something if PyTrg doesn't detect the standard labels?[/quote]
Hmm PyTRG should accept custom AI scripts but it should give a warning or possibly error if it doesn't detect the ID in the loaded aiscript.bin (in settings). I'll look into it.

[quote name='bajadulce' post='9096' date='Jan 24 2010, 12:19 PM']I forget how one would import a non-default labeled Ai script in StarEdit? I remember SCAIEdit3 used to make up new labels for "new" scripts and compile a stat_txt.tbl. How was that then entered into StarEdit? Would you run the modded files and then access the "campaign editor" from within the game? ... not that I have any plans to use another script, but am curious to the steps. I think SCAIEdit's tutorial script may do such a thing.[/quote]
You can use MPQDraft to create a StarEdit "mod", you can also use SCMDraft to load custom MPQ's. Also, if anyone didn't know, the stat_txt.tbl entry for AI scripts has no effect except being listed in the StarEdit GUI triggers instead of the AI ID.

[quote name='bajadulce' post='9096' date='Jan 24 2010, 12:19 PM'][quote name='poiuy_qwert' post='9095' date='Jan 24 2010, 08:02 AM'][quote name='bajadulce' post='9080' date='Jan 22 2010, 02:51 AM']One funny thing to make a note of in terms of error reporting. In the following code, if one forgets to put the <0> at the end of a comment string, then the compiler will report something wrong with the next string (in this case string 2). Which can be a bit confusing at first. Don't know if it's possible to alert of this error?[/quote]
What is the error you get?[/quote]Well since a picture is worth a thousand words, I'll spare you my ramblings: :P
.. now back to testing this new idea! :P
[/quote]
Ah I see. Yeah I should implement some warnings if it detects "String #:" inside a string, though there is not much else PyTRG can do about it. ProTRG doesn't have this problem though ;P

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