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

User login

  • Create new account
  • Request new password

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 6 users and 168 guests online.

Online users

  • Slimbo
  • Fyron
  • Faithful
  • Shadow hornet
  • Unole
  • Jozsf

Languages

  • English English
  • French French

Browse archives

« May 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  
Home » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Invalic Index Parsing error?

Isopsyco's picture
Submitted by Isopsyco on Sun, 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 ›
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Isopsyco's picture
Mod Designer

Re: Invalic Index Parsing error?

Submitted by Isopsyco on Sun, 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

» login or register to post comments
Isopsyco's picture
Mod Designer

Re: Invalic Index Parsing error?

Submitted by Isopsyco on Sun, 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.

» login or register to post comments
Mod Designer

Re: Invalic Index Parsing error?

Submitted by Gideon on Mon, 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

» login or register to post comments
Isopsyco's picture
Mod Designer

Re: Invalic Index Parsing error?

Submitted by Isopsyco on Mon, 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...

» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Now on STEAM

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

Popular content

Today's:

  • Defence vs. Attack and other Combat related questions...
  • Sphärenwelt
  • Why Retrofit is limited to +50% per order?
  • Babylon 5 Wars SEV Mod Update
  • Balance Mod Neutral Races

All time:

  • 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

Last viewed:

  • Treaties?
  • Coming soon: Starbase Defense
  • what is the maximum construction rate that can be achieved on a planet/ship?
  • Limiting Component
  • How do i delete a facility
(c) Strategy First, Inc. All rights reserved.