Accueil Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

Connexion utilisateur

  • Créer un nouveau compte
  • Demander un nouveau mot de passe

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • agrégateur de nouvelles

Rechercher

Qui est en ligne

Il y a actuellement 1 utilisateur et 142 invités en ligne.

Languages

  • English English
  • French French

Parcourir les archives

« October 2008  
Mo Tu We Th Fr Sa Su
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Invalic Index Parsing error?

Image de Isopsyco
Soumis par Isopsyco le Dim, 2007-11-25 23:29 SE:V MODs

I'm trying to parse a script and I get this error: Invalid Index 1

Its related to the function call set up :

Begin
  set loop_index1 := Sys_Get_Number_Of_Players()
  loop
    call event_list.insert(1,64)
    set loopcount1 := loopcount1 + 1
    call Sys_Empire_Log_Get_Log_Entries_For_This_Turn(loopcount1,event_list)
    set loop_index2 := event_list.count()
    loop
      set loopcount2 := loopcount2 + 1
      set log_index := event_list.get(loopcount2)
      if (log_index = 64 or log_index = 66) then
	set empire_name := Sys_Empire_Get_Empire_Name(loopcount1)
        set system_loc := Sys_Empire_Log_Get_Log_Entry_System_Location(loopcount1,loopcount2)
        set sector_loc := Sys_Empire_Log_Get_Log_Entry_Sector_Location(loopcount1,loopcount2)
	set debris_date := Sys_Empire_Log_Get_Log_Entry_Date(loopcount1,loopcount2)
	if (Sys_Are_We_Computer_Player(loopcount1)) then
	  case empire_name

Any idea what the "by reference" means in the script docs and how to use it. I think thats my problem.

‹ Lists... Ground Combat Mod 2.12 ›
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.
Image de Isopsyco
Mod Designer

Re: Invalic Index Parsing error?

Soumis par Isopsyco le Dim, 2007-11-25 23:31

The event_list.insert line is a leftover of my error checking so I could have something in the list. But I'm indexing them wrong somehow and I don't see it. Not familiar with this script, given the docs are weakly written Sad

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Isopsyco
Mod Designer

Re: Invalic Index Parsing error?

Soumis par Isopsyco le Dim, 2007-11-25 23:55

I think I may have my own answer. I think it references the game global variable sys_long_Player_ID, which has to be used in the empire main script portion.

I'll try moving my function there and adjusting my script a little to just look for the event by each empire.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Invalic Index Parsing error?

Soumis par Gideon le Lun, 2007-11-26 19:00

Not sure if this is your problem, but shouldn't it look like this?

    call Sys_Empire_Log_Get_Log_Entries_For_This_Turn(loopcount1,event_list)
    set loop_index2 := event_list.count()
    set loopcount2 := 0
    loop
      set loopcount2 := loopcount2 + 1
      set log_index := event_list.get(loopcount2)

Otherwise when the outside loop progresses, loopcount2 will start counting at where ever the inside loop left it.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Isopsyco
Mod Designer

Re: Invalic Index Parsing error?

Soumis par Isopsyco le Lun, 2007-11-26 21:59

It does, I declared my variables but didn't show that section (sorry..) to save some screen room. loopcount2 is set to zero on declaration.

I'm not sure whats going on with the indexing error I'm getting. I found a similar use (identical function call to fill the list!) in the Politics.txt data file.

I'm debugging to see why that one works and mine doesn't...

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Contenu populaire

Aujourd'hui :

  • Research By Percentage SUCKS
  • More organic stuff is needed.
  • Nebula Storm
  • No Point Defence in Technology in Balance mod
  • Space Dock suggestion

Depuis toujours :

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Dernier accès :

  • Space Empires VI
  • Rioting people, what can I do?
  • Typical results?
  • Bad Weapon Design Logic
  • Question about initiating Ground Combat... how?
(c) Strategy First, Inc. All rights reserved.