Announcement

Collapse
No announcement yet.

PROJECT: Playtest (the 4th Thread)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #76
    Two observations:

    A) Scenario structure: The game does not recognize soundfiles in the scenario folder (e.g. \scen0000\default\sound\something.wav). When I put something.wav into the main sound folder, everything is fine .

    B) In the meantime I produced a new crash similar to the above, but I forgot to save the log. Anyways -- the similarity was in the ProcessMatches / Scheduler portion, additionally it said something about the AI-Time Slice. I should note that I have modified the Time Slice settings in const.txt.

    With the following settings I got the crashes:

    Code:
    AI_GOAL_TIME_SLICE	100
    AI_MAX_TIME_SLICE	1000
    AI_TOTAL_TIME_SLICE	11000
    With the settings used by most mods since Apolyton pack 1.0 I did not experience those crashes so far:

    Code:
    AI_GOAL_TIME_SLICE	175
    AI_MAX_TIME_SLICE	1750
    AI_TOTAL_TIME_SLICE	22000
    Do these settings require some ratio?

    Edit: I forgot to mention the political situation: I have fixed my revolting civs issue (the slider settings I had copied from MedMod were too extreme).

    Now I just have the usual single cities eventually revolting and creating a new civ. The game does not seem to have any problems handling these new civs.

    So my impression is that the program crashed because it could not handle civs suddenly disappearing (I imagine the program -- THE GOVERNOR -- possibly tried to process items that were no longer in the game, or something along these lines).
    Last edited by BureauBert; April 29, 2006, 10:33.
    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

    Comment


    • #77
      Originally posted by BureauBert
      Do these settings require some ratio?
      No idea but actually they shouldn't as there are no mechanisms that prevent you from using your settings.

      For the time slice settings we thought that it was a good idea to give the AI more time for its actions. (Wether this really gives the AI more time is another question.)

      -Martin
      Civ2 military advisor: "No complaints, Sir!"

      Comment


      • #78
        I have reset the time slice settings to the "Apolyton pack" (175, 1750, 22000) values since reducing the time slice does not seem to significantly save turn-processing time anyways.

        However I am frequently getting crashes like this one:

        0x00879d46 [?Rollback_All_Agents@Plan@@QAEJXZ + 0x95]
        0x0087cfa7 [?Remove_Matches_For_Squad@Scheduler@@IAEXABQAVSqua d@@@Z + 0x73]
        0x0087b69e [?Process_Squad_Changes@Scheduler@@QAE?AW4TIME_SLIC E_STATE@1@XZ + 0x16b]
        0x008a1993 [?GEVHookCallback@CtpAi_ProcessMatchesEvent@@EAE?AW 4GAME_EVENT_HOOK_DISPOSITION@@W4GAME_EVENT@@PAVGam eEventArgList@@@Z + 0x87]
        0x005be51f [?Run@GameEventHook@@AAE?AW4GAME_EVENT_ERR@@AAViter ator@?$list@UNode@GameEventHook@@V?$allocator@UNod e@GameEventHook@@@std@@@std@@PAVGameEventArgList@@ AAJ@Z + 0x63]
        0x005be4b6 [?Activate@GameEventHook@@QAE?AW4GAME_EVENT_ERR@@PA VGameEventArgList@@JAAJ@Z + 0x7e]
        0x005bf0da [?ActivateHook@GameEventManager@@QAE?AW4GAME_EVENT_ ERR@@W4GAME_EVENT@@PAVGameEventArgList@@JAAJ@Z + 0x3a]
        0x005bcdd4 [?Process@GameEvent@@QAE?AW4GAME_EVENT_ERR@@AAH@Z + 0x2f]
        0x005bef38 [?ProcessHead@GameEventManager@@QAE?AW4GAME_EVENT_E RR@@XZ + 0x33]
        0x005beedb [?Process@GameEventManager@@QAE?AW4GAME_EVENT_ERR@@ XZ + 0x7b]
        0x0040f061 [?Process@CivApp@@QAEJXZ + 0x103]
        0x00407dd0 [?CivMain@@YGHPAUHINSTANCE__@@0PADH@Z + 0x3b6]
        0x00407847 [WinMain@16 + 0x74]
        0x008b10ec [WinMainCRTStartup + 0x134]
        0x7c816d4f [__onexitbegin + 0x7bc66e37]
        The common portions for all those crashes are Rollback_All_Agents and the Matches / Scheduler thingy . The TIME_SLICE_STATE thingy does occur sometimes, but not necessarily. Sometimes I am able to continue the game from a save I made immediately before the crash, sometimes I need to go back to a previous save. Obviously the crashes become more frequent as there are more units around.

        BTW I had some other crashes involving the words GameEvent and iterator .
        Last edited by Martin Gühmann; May 22, 2008, 17:53.
        The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

        Comment


        • #79
          CantAttackHaveTreaty

          In my current playtest I seem to have an agreement with good old barbs, though I never negotiate with terrorists -- maybe it's something in my revised version of diplomod, I will need to check this.

          However -- when I try to attack a barb stack, I get this

          Code:
          alertBox '110bCantAttackHaveTreaty'
          which is a good feature but doesn't work as expected.

          When pressing "no" the order is not executed.

          When pressing "yes" the order is not executed either.

          The "yes" portion seems a bit dubious anyway:

          Code:
          alertBox '110bCantAttackHaveTreaty' {
          	Text(ID_CANT_ATTACK_HAVE_TREATY);
          
          	MessageType("DIPLOMATIC");
          	
          
          	Button(ID_BUTTON_NO) {
          		ClearOrders(unit[0]);
          		Kill();
          	}
          
          	Button(ID_BUTTON_YES) {
          		BreakAlliance(player[0]);
          		AddOrder(unit[0], location[0]);
          		Kill();
          	}
          }
          BreakAlliance I assume this could be removed since attacking them will break any agreement anyway. Officially declaring the break of the agreement one turn before actually attacking them would be a third option for doing it the diplomatically correct way .
          Maybe

          Code:
          AddOrder(unit[0], location[0]);
          should be replaced by something like

          Code:
          [URL=http://www.ctp2.info/database/slic/events/armies/battle/Battle.shtml]Event: Battle[/URL](army[0], location[0]);
          Of course I will try myself, but this may take some time ... And as the AlertBox is tied to the sourcecode, it might be easier for a sourcecoder to figure out what's needed / what will work in this context.
          The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

          Comment


          • #80
            I'll relook at my files because lately mine has been working. I hit Yes and war is declared and the attack continues. Not sure why it is working since I had the most problems.

            my script.slic says:
            Code:
            alertBox '110bCantAttackHaveTreaty' {
            	Text(ID_CANT_ATTACK_HAVE_TREATY);
            
            	MessageType("DIPLOMATIC");
            	
            
            	Button(ID_BUTTON_NO) {
            		ClearOrders(unit[0]);
            		Kill();
            	}
            
            	Button(ID_BUTTON_YES) {
            		//BreakAlliance(player[0]);
            		DeclareWar(g.player, player[0]);
            		AddOrder(unit[0], location[0]);
            		Kill();
            	}
            }
            I guess we need to make sure that files was updated.


            As for fighting barbarians I'll go back to armydata and add a Player = 0 check.
            Formerly known as "E" on Apolyton

            See me at Civfanatics.com

            Comment


            • #81
              my script.slic says:
              Code:
              //BreakAlliance(player[0]);
              DeclareWar(g.player, player[0]);
              AddOrder(unit[0], location[0]);
              Ahhh, so it says something different and I need to update mine .
              Thank you!

              As for fighting barbarians I'll go back to armydata and add a Player = 0 check
              The strange thing was that I had diplo relations with good old barbs though they don't appear in the diplo manager, they never made a proposal and I never talked to them at all -- usually it should be impossible to have diplo relations with barbs . I added a player[x] != 0 check to all my modded diplomod functions, even where such a check is definitely redundant, I will see what happens -- if it's not in my SLIC it's possibly in the source . BTW I know something has been modified in the source to make the AI have diplo relations with each other, so some parts of diplomod may have become unnecessary, but I don't know what exactly has been done ...
              The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

              Comment


              • #82
                I think most AI to AI diplomacy has been implemented atleast thats what I've seen as the AI has had peace treaties and war with each other.

                As for the bars, to be clear I did get the pop-up as to whether or not I wanted to declare war on the barbs although I also had no barbs in diplomacy. There is no barb diplomacy and I'm looking to exclude barbs from this pop-up although I like the idea of being prompted in case i didn't want to attack the barbs


                PS the playtest and the repository needs the SLIC updated so I'll do that tonight
                Last edited by Ekmek; May 2, 2006, 12:27.
                Formerly known as "E" on Apolyton

                See me at Civfanatics.com

                Comment


                • #83
                  Well the wording of this message is a bit irritating because it warns you about breaking an agreement which doesn't exist. Personally I think a warning is not necessary or particularily useful if the action won't violate an agreement or otherwise affect your diplomatic status -- I mean, noone will care if you attack the barbarians, not even good old barbs themselves . On the other hand I respect your respectful attitude towards our friends in red* and I won't mind getting a non-diplo message before attacking them .

                  *) default colorset
                  The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                  Comment


                  • #84
                    I think this one is not a big deal, but I noticed that I am getting a new crash.txt when quitting the game (still rev565 build). Whatever goes wrong with the "Cleanup@SlicSegment" doesn't look or feel like a crash, and it doesn't seem to do any harm, it just produces a new entry:

                    0x7c920f29 [__onexitbegin + 0x7bd71011]
                    0x7c920d5c [__onexitbegin + 0x7bd70e44]
                    0x77bfc2de [__onexitbegin + 0x7704c3c6]
                    0x0040229e [??3@YAXPAX@Z + 0x15]
                    0x005b5b07 [??1SlicSegment@@QAE@XZ + 0x107]
                    0x008b0ca1 [??_M@YGXPAXIHP6EX0@Z@Z + 0x45]
                    0x005b6fab [??_ESlicSegment@@QAEPAXI@Z + 0x2b]
                    0x005b6e15 [??1?$Pool@VSlicSegment@@@@QAE@XZ + 0x75]
                    0x005b6cdf [??_G?$Pool@VSlicSegment@@@@QAEPAXI@Z + 0xf]
                    0x005b6c28 [?Cleanup@SlicSegment@@SAXXZ + 0x24]
                    0x0040d2eb [?CleanupApp@CivApp@@QAEJXZ + 0x13a]
                    0x00407e96 [?DoFinalCleanup@@YAXH@Z + 0x4c]
                    0x0040811d [?WndProc@@YGJPAUHWND__@@IIJ@Z + 0x27b]
                    0x77d18734 [__onexitbegin + 0x7716881c]
                    0x77d18816 [__onexitbegin + 0x771688fe]
                    0x77d1c63f [__onexitbegin + 0x7716c727]
                    0x77d1e905 [__onexitbegin + 0x7716e9ed]
                    0x736f1967 [__onexitbegin + 0x72b41a4f]
                    0x77d18734 [__onexitbegin + 0x7716881c]
                    0x77d18816 [__onexitbegin + 0x771688fe]
                    0x77d189cd [__onexitbegin + 0x77168ab5]
                    0x77d196c7 [__onexitbegin + 0x771697af]
                    0x00407e26 [?CivMain@@YGHPAUHINSTANCE__@@0PADH@Z + 0x40c]
                    0x00407847 [WinMain@16 + 0x74]
                    0x008b10ec [WinMainCRTStartup + 0x134]
                    0x7c816d4f [__onexitbegin + 0x7bc66e37]
                    Last edited by Martin Gühmann; May 22, 2008, 17:52.
                    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                    Comment


                    • #85
                      I think the new rev 570 might address that, well Martin's Slic changes might help.
                      Formerly known as "E" on Apolyton

                      See me at Civfanatics.com

                      Comment


                      • #86
                        New build, new crash (rev570 build, during /rnd automated Mod- and crash-testing, seems like an AI is disbanding a unit, but it does also say something about the chat window -- I sware I just entered /rnd20 and closed that window ):

                        0x004cee70 [?GameObj_Get@@YAPBVGAMEOBJ@@PAV1@K@Z + 0x9]
                        0x004843c4 [?Get@ObjPool@@QBEPBVGAMEOBJ@@K@Z + 0x24]
                        0x00505af3 [?GetUnit@UnitPool@@QBEPAVUnitData@@K@Z + 0x13]
                        0x00501a9a [?KillUnit@Unit@@QAEXW4CAUSE_REMOVE_ARMY@@J@Z + 0x1a]
                        0x00499977 [?Kill@Unit@@QAEXW4CAUSE_REMOVE_ARMY@@J@Z + 0x17]
                        0x00495464 [?Disband@ArmyData@@QAEXXZ + 0x268]
                        0x0049074e [?ExecuteOrders@ArmyData@@QAEH_N@Z + 0x3fa]
                        0x004901f5 [?AddOrders@ArmyData@@QAEXW4UNIT_ORDER_TYPE@@PAVPat h@@ABVMapPoint@@JW4GAME_EVENT@@@Z + 0x7f5]
                        0x0048f865 [?AddOrders@ArmyData@@QAEXW4UNIT_ORDER_TYPE@@@Z + 0x23]
                        0x0049c922 [?GEVHookCallback@ArmyDisbandArmyOrderEvent@@EAE?AW 4GAME_EVENT_HOOK_DISPOSITION@@W4GAME_EVENT@@PAVGam eEventArgList@@@Z + 0x38]
                        0x005be85f [?Run@GameEventHook@@AAE?AW4GAME_EVENT_ERR@@AAViter ator@?$list@UNode@GameEventHook@@V?$allocator@UNod e@GameEventHook@@@std@@@std@@PAVGameEventArgList@@ AAJ@Z + 0x63]
                        0x005be7f6 [?Activate@GameEventHook@@QAE?AW4GAME_EVENT_ERR@@PA VGameEventArgList@@JAAJ@Z + 0x7e]
                        0x005bf54a [?ActivateHook@GameEventManager@@QAE?AW4GAME_EVENT_ ERR@@W4GAME_EVENT@@PAVGameEventArgList@@JAAJ@Z + 0x3a]
                        0x005bd114 [?Process@GameEvent@@QAE?AW4GAME_EVENT_ERR@@AAH@Z + 0x2f]
                        0x005bf3a8 [?ProcessHead@GameEventManager@@QAE?AW4GAME_EVENT_E RR@@XZ + 0x33]
                        0x005bf34b [?Process@GameEventManager@@QAE?AW4GAME_EVENT_ERR@@ XZ + 0x7b]
                        0x0040eff9 [?Process@CivApp@@QAEJXZ + 0x103]
                        0x0076fa00 [?CheckForEasterEggs@ChatWindow@@QAEHPAD@Z + 0x124]
                        0x0076f8b7 [?ChatCallback@ChatWindow@@SAXPAVaui_Control@@KKPAX @Z + 0x84]
                        0x006d9da1 [?HitEnter@aui_TextField@@SAXPAUHWND__@@@Z + 0x52]
                        0x006da34b [?TextFieldWindowProc@@YGJPAUHWND__@@IIJ@Z + 0x101]
                        0x77d18734 [__onexitbegin + 0x7716551c]
                        0x77d18816 [__onexitbegin + 0x771655fe]
                        0x77d189cd [__onexitbegin + 0x771657b5]
                        0x77d196c7 [__onexitbegin + 0x771664af]
                        0x00407e16 [?CivMain@@YGHPAUHINSTANCE__@@0PADH@Z + 0x40c]
                        0x00407837 [WinMain@16 + 0x74]
                        0x008b306c [WinMainCRTStartup + 0x134]
                        0x7c816d4f [__onexitbegin + 0x7bc63b37]
                        P.S.: I think I will continue testing with the build from rev568, since it allowed me to run through 150+ turns without crashes. BTW I read in the revision reports that Martin has modified the DiffDB-format, but there is no updated file enclosed with the 570 build -- the program does not complain about my old-fashioned DiffDB though .
                        Last edited by Martin Gühmann; May 22, 2008, 17:52.
                        The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                        Comment


                        • #87
                          I know exactly what the problem is I messed with it a few nights ago so I'll have a new build up soon WITH my now working upgrade code.

                          Martin's DiffDB work is like his CivilizationDB, it remains compatible with the old one.
                          Formerly known as "E" on Apolyton

                          See me at Civfanatics.com

                          Comment


                          • #88
                            Ok, now I'll get back to finishing ShowOnMAp, though it kind of works now

                            Revision 571 is in my sig. For the trolls:

                            Changelog:
                            2006-05-03
                            Added: UpgradeTo flag now implemented. With enough gold you can upgrade units by sleeping them in your city
                            Added: flags for the difficulty dependent AI gold deficit and units over production cheats.

                            2006-04-29
                            Added: TargetsCivilians where a unit that bombs a city hits civilians not units.
                            Added: PrecisionStrike where a unit that bombs a city hits buildings not units.
                            Added: MultipleAttack flag units with this flag can attack as amny times as they have move points
                            Added: AvailableAdvance for goods, now you can specifyan advance required in order for a city to collect (it will still be on the map though)
                            Added: VanishAdvance for goods, now you can specify an advance that stops a city from collecting a good
                            Added: CantTrade a good can never be collected, just a bonus (like an oasis)
                            Added: HappyInc flag for goods, now goods that are traded can add happiness to a city

                            2006-04-14
                            Added: CanCaptureTile check in pillage. Units with this flag capture nemy tiles
                            instead of pillaging them
                            Added: CanBeGifted to units and now a human player can gift units to players
                            not at war with and you get regard bonus based on attack divided by 5
                            Added: DeniedToEnemy, tileimps that have a movecost wont count with this flag
                            for players you are at war with
                            Added: Sea pirates! barbarians may have navies
                            Added: If the terrain score equals 0 than the AI won't try to settle there (hopefully)
                            Fixed: Bug that disbanded all units when you tried to add settler to city
                            Fixed: Goodyhut crash caused by having more units than advances

                            2006-04-01
                            Added: ShowOnMap now you can specify a certain tileimp to be built is a wonder
                            or building is built
                            Added: ObsoleteUnit flag; units can be obsolete by other units availability not
                            just techs
                            Added: MoveBonus flag for units; now you can specify how much points a unit
                            will lose when it moves. MoveBonus 33 is like Civ2's AllTerrainAsRoads. Note
                            going to different cost imps might not be possible if you lack move points.
                            Added: GoldPerUnitSupport Units have a GoldHunger impact on cost
                            Added: GoldHunger units can now have a variable gold cost
                            Added: BorderRadius for wonders so wonders can increase border radius

                            2006-03-22
                            Added: production bonus to AI, they dont run production deficits
                            Added: GoodyHutExcluded flag (just in case) for advances
                            Added: messages for verifyattack and move into enemy. If you move into an enemy
                            or attack WIHOUT declaring war you will get a popup, but the popup doesnt let
                            you declare war (yet) you have to do that through the diplomacy screen.
                            Added: newupkeep flags,although not necessary (may remove)
                            Added: gold bonus to AI so they dont have to be hurt by negative values. If a
                            cities gold is less than zero for an AI it is automatically set to zero so
                            they dont get hurt by new gold modifiers

                            2006-03-11
                            Added: GoodyHutExcluded flag for Units. Units with this flag shouldn't appear
                            from a goody hut.
                            Added: Enablesgood in terraineffect - allows for different goods for same imp
                            on different terrains

                            2006-03-02
                            Added: EnablesVeterans flag for buildings. Now if a city has a flag with this
                            building your units start as veterans (like civ3)
                            Added: PopCostsToBuild flag. Add an integer here in unitstxt and units can cost
                            one or more population points. I havent instituted a disband city warning yet
                            though

                            2006-03-01
                            Added: GoldPerUnit - like my previous GoldPerCity flag but its just the flag
                            value times the number of units (like Civ3). I stuck it to the palace to
                            represent unit costs. Value seen in City Management (not national)
                            Added: GoldPerUnitReadiness - same as above but added the readiness impact.
                            Value seen in City Management (not national)
                            Added: Need Number of buildings to Build - like the feat it can now be a flag
                            for building a building (especially with OnePerCiv) or a wonder.
                            Added: Citystyle Bonuses to Gold, Food, and production by either a bonus
                            (just a solid integer) or by a percentage.
                            Added: Increase Borders to AddImprovement. Buildings can now do city radius!
                            Added: multipleattack flag but not fully implemented (you can move after
                            attacking or bombarding but not attack again)
                            Added: TotalBuildingUpkeep: building upkeep also has a negative impact by being
                            affected by your readiness and is deducted from the city gold (I can remove
                            this if too much hate for it but it makes gold and readiness more significant)


                            [i]
                            EDIT: I played over 100 turns last night without any crashes. so far so good.[i\]
                            Last edited by Ekmek; May 4, 2006, 15:56.
                            Formerly known as "E" on Apolyton

                            See me at Civfanatics.com

                            Comment


                            • #89
                              Thanks a lot, E! I just upgraded to rev571 build -- no crashes so far, the game runs pretty smoothly (ultra gig map of course, with 10 players, the usual automated crashtest-procedure).

                              Another thing is that I am trying to approach the state of the art regarding the basic functions of my mod -- to this end I implemented a "PowerPoints unit recognition framework" as already present in e.g. "Call To Conquest". Unfortunately it doesn't work -- namely database access doesn't seem to work as expected/advertised:

                              Code:
                              UNIT_SETTLER {
                              	.
                              	.
                              	.
                              	PowerPoints 19
                              	.
                              	.
                              	.
                              }
                              
                              
                              int_f IsLandSettler(unit_t theUnit) {
                              	unit_t tmpUnit;
                              	int_t tmpType;
                              	int_t tmpPowerPoints;
                              
                              	tmpUnit = theUnit;
                              	tmpType = tmpUnit.type;
                              	tmpPowerPoints = UnitDB(tmpType).PowerPoints;
                              
                              	if(tmpPowerPoints == 19) {
                              		return 1;
                              	}
                              	return 0;
                              }
                              Using this function every unit is recognized as a land settler. I also tried other flags in UnitDB like SettleSize with no better result.

                              The funny thing is that another DB-access that seemed to be broken in previous builds now works -- GovernmentDB(index).Something:

                              Code:
                              tmpPlayer = player[0].owner;
                              tmpGov = player[0].government;
                              
                              	MOD_MAXCITIES[tmpPlayer] = GovernmentDB(tmpGov).TooManyCitiesThreshold;
                              I didn't change these lines since my previous attempts, I just un-commented them for fun , however I am glad this portion now works.

                              A minor issue that's not really an issue to me: There seems to be a problem with the "final cleanup" or something, because sometimes when I quit the game I get a black screen for some minutes unless I shut down ctp2.exe via taskmanager. There is no crash text (since the game doesn't crash, it just doesn't unload). But maybe it's just a special feature on my system ...

                              And an itty-bitty, absolutely minor not-an-issue-at-all: You have included the script.slc from your Civ3-Mod and forgot to out-comment some of the Mod-specific includes, so the game complains about missing SLICs on startup which might threaten less experienced playtesters . At least I hope there will be other playtesters again -- we could need someone testing the unmodded game .
                              The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                              Comment


                              • #90
                                Try this:

                                Code:
                                tmpPowerPoints = UnitDB(tmpUnit.type).PowerPoints;
                                Actually when I did a search for "powerpoints" on my old HD, I discovered that I had exposed the "GetPowerPoints" method to SLIC:

                                Code:
                                in SlicEngine.cpp:
                                void SlicEngine::AddBuiltinFunctions()
                                {
                                ...
                                m_functionHash->Add(new Slic_GetPowerPoints); // PFT 280404
                                Code:
                                in slicfunction.cpp:
                                
                                SFN_ERROR Slic_GetPowerPoints::Call(SlicArgList *args)
                                {
                                    if(args->m_numArgs != 1)
                                		return SFN_ERROR_NUM_ARGS;
                                
                                	sint32 index = -1;
                                	
                                    if(!args->GetInt(0, index))
                                		return SFN_ERROR_TYPE_ARGS;
                                    
                                	if(index<0 || index>g_theUnitDB->NumRecords())
                                		return SFN_ERROR_OUT_OF_RANGE;
                                
                                    m_result.m_int = g_theUnitDB->Get(index)->GetPowerPoints();
                                //    DPRINTF(k_DBG_SLIC, ("Slic_GetPowerPoints: %d\n", m_result.m_int));
                                    return SFN_ERROR_OK;
                                }
                                Code:
                                in SlicFunc.h:
                                SLICFUNC(SFR_INT, GetPowerPoints) //added 280404 by PFT
                                I don't have a current version of the source code and can't remember whether I sent this in. I do remember that I had quite a lot of stuff that was working, but not quite finished, and I never got around to adding it to the project.

                                Comment

                                Working...
                                X