1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Ok, give me a straight answer here...

Discussion in 'Civ4 - SDK/Python' started by Dryhad, Jun 8, 2008.

  1. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    Is it even possible to call CvPlayer.revolution from python? One of its arguments is a pointer.
     
  2. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    Why wouldn't you be able to pass a pointer in Python?

    After looking at the API
    Code:
    VOID revolution(INT paeNewCivics, BOOL bForce)
    void (int (CivicTypes*) paeNewCivics, bool bForce)
    paeNewCivics - pae - Pointer Array Enum - It wants a pointer to an array of civic enumarates. Or in python terms it wants a list of civic type integers.
     
  3. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    Because Python doesn't have pointers. And lists don't work either. Just try it, I'll wait.

    Although I have managed to avoid calling this function in the first place by duplicating its effects in Python. It would still be interesting to know if it was possible to call it, but it's not really necessary any more.
     

Share This Page