Results 1 to 18 of 18

Thread: unknown error in EDB

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default unknown error in EDB

    This is a communication from logfile
    23:31:23.281 [script.err] [error] Script Error in mods/oikoumene/data/export_descr_buildings.txt, at line 527, column 202
    Unexpected in condition parsing: 'recruit_pool'
    and proper line from EDB
    PHP Code:
                    recruit_pool "Polish Nobles"  0.85   0.005   1  0  requires factions hre, } and not event_counter player_hre 1 and hidden_resource pol and region_religion catholic 70 
    I cannot find the error. What can be wrong with it?

  2. #2
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: unknown error in EDB

    The syntax is perfectly fine, but the error appears in column 202, your code has only 185 columns. Are you sure there's nothing in column 202?


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  3. #3
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: unknown error in EDB

    Also the clause with the not should be the last one on the line.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  4. #4

    Default Re: unknown error in EDB

    Aikanar
    Where is those column? How to find it? I never knew what are columns and how to find it.

    Squid - i completly don't get you. What clause?

  5. #5
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: unknown error in EDB

    Quote Originally Posted by attyla View Post
    Aikanar
    Where is those column? How to find it? I never knew what are columns and how to find it.
    Column = character including spaces.
    I suggest to use an editor like notepadd++ or the such.
    Open the EDB with it, search for the line and then find column 202 in that line.
    At which column your cursor is positioned will be displayed in the toeboard of notepad++

    Quote Originally Posted by attyla View Post
    Squid - i completly don't get you. What clause?
    Squid means that you should place the negative condition last, that it looks like this:
    Code:
     recruit_pool "Polish Nobles"  0.85   0.005   1  0  requires factions { hre, }  and hidden_resource pol and region_religion catholic 70 and not event_counter player_hre 1


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  6. #6

    Default Re: unknown error in EDB

    I don't know why, but the game don't want to accept units dedicated to hre only. I have a lot other entries with Polish Nobles with the same or almost the same conditions for many other factions but only entries for hre cause errors. I've never seen something like this before...

  7. #7
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: unknown error in EDB

    Have you tried to comment the line out and see whether you won't get other errors?


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  8. #8

    Default Re: unknown error in EDB

    Without condition
    PHP Code:
     and not event_counter player_hre 1 
    works well.

    I can't understand why, because i have the same script for all of factions and other works fine.
    This is the event:
    PHP Code:
    declare_counter player_hre

    monitor_event FactionTurnStart FactionType hre
        
    if I_IsFactionAIControlled hre
            set_event_counter player_hre 1
        end_if
    terminate_monitor
    end_monitor 

  9. #9
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: unknown error in EDB

    Quote Originally Posted by attyla View Post
    Without condition
    PHP Code:
     and not event_counter player_hre 1 
    works well.

    I can't understand why, because i have the same script for all of factions and other works fine.
    This is the event:
    PHP Code:
    declare_counter player_hre

    monitor_event FactionTurnStart FactionType hre
        
    if I_IsFactionAIControlled hre
            set_event_counter player_hre 1
        end_if
    terminate_monitor
    end_monitor 
    You don't need to add an event for the use of event_counters and event_counters must not be declared.
    It's totally fine if you use it like:
    Code:
    monitor_event PreFactionTurnStart FactionType hre
    	if I_IsFactionAIControlled hre
    		set_event_counter player_hre 1
    	end_if
    terminate_monitor
    end_monitor
    I guess you're doing it for all other factions alike. If not so, it's sort of more elegant to use:

    Code:
    monitor_event PreFactionTurnStart IsFactionAIControlled
    and FactionType hre
    set_event_counter player_hre 1
    terminate_monitor
    end_monitor
    Last edited by Aikanár; February 12, 2012 at 10:41 AM.


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  10. #10
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: unknown error in EDB

    you should use
    add_events
    event counter player_hre
    end_add_events

    instead of
    declare_counter player_hre.

    Are you really sure other ones are fine?

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  11. #11

    Default Re: unknown error in EDB

    Yes i'm sure. Because of that i have no idea what was wrong. I will try to use your code. I hope it is the reason of my problems, because it is very simply to fix
    Last edited by attyla; February 12, 2012 at 09:00 AM.

  12. #12

    Default Re: unknown error in EDB

    It didn't help I have the same communication about the same error.

  13. #13
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: unknown error in EDB

    LOL stupid me

    uhm, "not event_counter player_hre 1" equals event_counter player_hre 0
    Try to use event_counter player_hre 0 without the negative "not"

    It really has been a while since I've modded rofl omg Aik omg


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  14. #14

    Default Re: unknown error in EDB

    if i'm not mistaken i can't use value of event different then "1" if i want to use it in EDB. I make this script to use in EDB.

  15. #15
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: unknown error in EDB

    I guess you're doing it for all other factions alike. If not so, it's sort of more elegant to use:

    Code:
     
    monitor_event
    PreFactionTurnStart IsFactionAIControlledand FactionType hre
    set_event_counter player_hre 1
    terminate_monitor
    end_monitor
    if you are really doing it for all the factions, isn't it better

    Code:
     
    monitor_event FactionTurnStart FactionIsLocal
    if I_IsFactionAIControlled hre
    set_event_counter player_hre 1
    end_if
    if I_IsFactionAIControlled france
    set_event_counter player_frence
    end_if [repeat the if call for each faction]
    terminate_monitor

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  16. #16
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: unknown error in EDB

    Sure thing, that's why I wrote "if not so "


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  17. #17
    Aikanár's Avatar no vaseline
    Join Date
    Mar 2009
    Location
    Sanctuary
    Posts
    12,516
    Blog Entries
    3

    Default Re: unknown error in EDB

    Event_counters are either on (1) or off (0).
    They are not supposed to be used with "not"
    Depending on whom you want to enable to recruit the unit, either the AI or the player, just set the event_counter in the corresponding way.

    recruitable for AI only:
    campaign_script
    monitor_event PreFactionTurnStart FactionIsLocal
    and I_TurnNumber = 0
    if I_IsFactionAIControlled hre
    set_event_counter ai_hre 1
    end_if
    ;repeat this for all other factions you inted to use similar event_counters
    terminate_monitor
    end_monitor

    EDB
    recruit_pool "Polish Nobles" 0.85 0.005 1 0 requires factions { hre, } and hidden_resource pol and event_counter ai_hre 1 and region_religion catholic 70


    or recruitable for the player only:
    campaign_script
    monitor_event PreFactionTurnStart FactionIsLocal
    and I_TurnNumber = 0
    if I_LocalFaction hre
    set_event_counter player_hre 1
    end_if
    ;repeat this for all other factions you inted to use similar event_counters
    terminate_monitor
    end_monitor

    EDB
    recruit_pool "Polish Nobles" 0.85 0.005 1 0 requires factions { hre, } and hidden_resource pol and event_counter player_hre 1 and region_religion catholic 70


    Son of Louis Lux, brother of MaxMazi, father of Squeaks, Makrell, Kaiser Leonidas, Iskar, Neadal, Sheridan, Bercor and HigoChumbo, house of Siblesz

    Not everything that counts can be counted, and not everything that can be counted counts.

  18. #18

    Default Re: unknown error in EDB

    It must be something else. i checked my EDB and i figured thad line causing error is not the first line using condition
    PHP Code:
    and not event_counter player_hre 1 
    All previous entries work fine. Only entry on line 527 and layter causes an error.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •