View topic - Game.gameID not working



All times are UTC + 1 hour


Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Game.gameID not working
PostPosted: 12 Mar 2010, 08:31 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Maybe it works in multiplayer but i need it for replays and singleplayer and it doesnt seem to work there.

Code:
function widget:Initialize()
Spring.Echo ("game id:" .. tostring(Game.gameID) )
end

shouldnt this display something like
game id: 994b01c0833aee69ad13f3
it only shows
game id:

Without the tostring it doesnt work either.
Lua noob mistake?
Game.version works.


Top
 Offline Profile  
 
PostPosted: 12 Mar 2010, 18:34 
Moderator

Joined: 19 May 2009, 20:10
FIXME -- loaded too early - not set yet


Top
 Offline Profile  
 
PostPosted: 12 Mar 2010, 23:25 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Image
oh no :(
what other way would there be to identify a game/replay?
mapname and modname can be the same as well as players.


Top
 Offline Profile  
 
PostPosted: 12 Mar 2010, 23:43 
Moderator

Joined: 19 May 2009, 20:10
Parse chat or infolog? GameID is printed there.


Top
 Offline Profile  
 
PostPosted: 05 Jul 2011, 17:27 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
Bump!!!


Top
 Offline Profile  
 
PostPosted: 07 May 2012, 14:59 
User avatar

Joined: 03 Jun 2010, 00:28
SirMaverick wrote:


Game.gameID still not working, its empty string AFTER start of the game... in frame 10 or later, too.


Top
 Offline Profile  
 
PostPosted: 09 May 2012, 17:28 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
https://github.com/spring/spring/commit ... c0d17d874e
---
what i used in the end to get gameid from chat:
Code:
function widget:AddConsoleLine(msg, priority)
if (string.find (msg, "GameID:") ~= nil) then
   game_id = string.sub (msg, 9) -- "GameID: xxxxxxx"
(if you do not want to wait)


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.