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
    • Core Products
    • Game Mods
    • Helper Applications
    • issues
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 4 users and 221 guests online.

Online users

  • Husker50
  • Captain Kwok
  • marhawkman
  • Pham Nuwen

Languages

  • English English
  • French French

Browse archives

« July 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 » projects & downloads » Core Products » Space Empires V » issues

Sys_Get_Empire_Fleet_ID doesn't work as expected

Submitted by bmaxa on Sat, 2007-03-17 19:36.
Project:Space Empires V
Version:1.25-rev2
Component:Code
Category:bug
Priority:critical
Assigned:Unassigned
Status:active

Description

Documentation says that this function should return
fleet id based on index which goes from 1 to obtained
number of fleets. This is not so.
Under the hood there is array which goes from 1 to fleet
count.
If fleet is disbanded element is set to 0.
If fleet is created element is is set to adequate index.
Value 1 for fleet id 1 at position 1. Value 2 for fleet id 2 at index position 2 and so on.
Sys_Get_Empire_Fleet_ID returns for index 1 value 1 if
fleet exists and value 0 if does not exists. This causes
problems with a code as fleet id 0 is returned instead of
2, for example, if fleet count is 1 and fleet at index 2
exists.
Fortunately this can be currently remedied
with following function as Sys_Get_Empire_Fleet_ID
simply returns index into array.

function Get_Empire_Fleet_ID returns long
params
player_id: long
index: long
vars
counter: long := 0
index1: long := 0
begin
loop
set index1 := index1 + 1
if (Sys_Get_Empire_Fleet_ID(player_id, index1) <> 0) then
set counter := counter + 1
endif
exitwhen (counter >= index)
endloop
return Sys_Get_Empire_Fleet_ID(player_id, index1)
end

Branimir Maksimovic

» login or register to post comments

Now on STEAM

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

Popular content

Today's:

  • Research By Percentage SUCKS
  • Space Empires V 1.74
  • Governmet mod/patch/addon
  • Tweaking the planet art without going all the way to FQM
  • Shipsets, Empires, and dead AIs

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:

  • How to loose your home system.
  • Babylon 5 Wars SEV Mod Update
  • Disabled ships
  • Unable to load game
  • GidMod, future concept: Planet Development.
(c) Strategy First, Inc. All rights reserved.