View topic - Blueprint maps causing unitsync to throw errors(wrong call?)



All times are UTC + 1 hour


Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 08 Mar 2012, 21:31 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
First of all, let me point out, that the only lobby that has issues with this is ZKLobby, SL and the rest work fine.

However, the reason for this thread is because it seems that lobby devs are not being told what correct calls they need to use in order to get information out of mapinfo.lua and the mapoptions stuff, etc.

Could one of the engine devs kinda explain it so everyone can understand and how to fix the issue so that if any of us run into this again we can point towards this thread?

Thanks! :-)


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 23:07 
Spring Developer

Joined: 31 May 2009, 23:08
can you be a bit more specific please?

unitsync.log maybe or c&p stdout or screenshot?


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 23:11 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Well it's basically the same issue that I posed about in general discussion ( viewtopic.php?f=1&t=27783 ), however, until recently NotaLobby was plagued by the same issue (which has since been resolved).

All I know is, this is very not awesome, and it appears that lobbydevs aren't getting the full scoop as far as what they should be using to get map info out of the archive. In particular, it seems to happen the most with maps using mapinfo.lua as opposed to SMD.

This thread is an attempt to have a place where they might be able to find by searching or that others of us can refer to for them to get proper answers.


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 00:35 
Spring Developer

Joined: 08 Oct 2006, 15:58
The reason is that all blueprint code assumes the "Spring" table and its synced access functions like GetMapOptions always exist / are valid, which they don't when unitsync executes it. You want the

Code:
if (Spring.GetMapOptions ~= nil and Spring.GetMapOptions().key == "value")


pattern.


Last edited by Kloot on 09 Mar 2012, 00:51, edited 1 time in total.

Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 00:50 
Spring Developer

Joined: 31 May 2009, 23:08
https://github.com/jk3064/Map-Blueprint/issues/1

(thanks, i wasn't sure before if thats an issue or not... it is!)


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 00:53 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
if the whole "Spring" table does not exist, wouldnt it have to be
if (Spring and Spring.GetMapOptions and ...) then


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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.