Invalic Index Parsing error? |

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.
» Vous devez vous identifier ou créer un compte pour écrire des commentaires
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




Re: Invalic Index Parsing error?
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