Page 1 of 1

Error while building a new release version

Posted: 16 June 2019, 16:11
by tchobello
Hello
I was about to release a new version and I got a JS syntax error :
Line/Column : 2411/13
LineSource : );
Details : syntax error


It was working properly on the local version. What did I miss ?
The error occurs on the penultimate line of this code.

Code: Select all

        notif_killUnderRockfall:function( notif )
		{
			this.confirmationDialog
			( 
				_('Would you like to kill this character ?'), dojo.hitch(this, function()
					{
						this.ajaxcall("/dungeontwister/dungeontwister/killUnderRockfall.html",	
							{ 
								lock: true, 
								character_id: notif.args.character_id
							}, 
							this, function( result ) {}, function( is_error) {} 
						);        
					}
				),
			    dojo.hitch(this, function()
					{
						this.ajaxcall("/dungeontwister/dungeontwister/cancelMove.html", 
							{ 
								lock: true 
							}, 
							this, function( result ) {}, function( is_error) {} 
						);        
					}
				),
            ); 
},

Re: Error while building a new release version

Posted: 16 June 2019, 16:22
by eoc
The indentation in the last two/three lines seems off. If this is the last defined notification, you're meant to close it with `}` (without the comma in the end).

Re: Error while building a new release version

Posted: 16 June 2019, 17:10
by A-dam
eoc wrote: 16 June 2019, 16:22 The indentation in the last two/three lines seems off. If this is the last defined notification, you're meant to close it with `}` (without the comma in the end).
the comma doesn't matter, for me it looks ok, I dont think the problem is in those lines you provide

Re: Error while building a new release version

Posted: 16 June 2019, 20:19
by RicardoRix

Re: Error while building a new release version

Posted: 16 June 2019, 21:43
by Een
Hi,
Probably the comma after the second dojo.hitch argument is not valid for shrinksafe (creates an expectation for a third argument).
http://en.doc.boardgamearena.com/Game_i ... nimization

Re: Error while building a new release version

Posted: 16 June 2019, 22:51
by tchobello
Een wrote: 16 June 2019, 21:43 Hi,
Probably the comma after the second dojo.hitch argument is not valid for shrinksafe (creates an expectation for a third argument).
http://en.doc.boardgamearena.com/Game_i ... nimization
Thanks Master.

I suppose first argument is called when you confirm and second argument is called when you decline and that's all.