"e.hitch is not a function" on my ajax calls. anyone understand it?

Game development with Board Game Arena Studio
Post Reply
c12h22o11_
Posts: 14
Joined: 03 June 2023, 03:26

"e.hitch is not a function" on my ajax calls. anyone understand it?

Post by c12h22o11_ »

On a few of my ajax calls, I am getting:

Code: Select all

Client error: TypeError: Error during callback from url ... e.hitch(...) is not a function. During distilledsugar/distilledsugar/reveal.html Received: {"status":1,"data":{"valid":1,"data":null}}
Anyone understand what this e.hitch() problem is?
User avatar
nicotacotac
Posts: 41
Joined: 20 March 2020, 13:42

Re: "e.hitch is not a function" on my ajax calls. anyone understand it?

Post by nicotacotac »

What is you Ajax call code?
And content of distilledsugar.action.php ( the reveal function) ?
c12h22o11_
Posts: 14
Joined: 03 June 2023, 03:26

Re: "e.hitch is not a function" on my ajax calls. anyone understand it?

Post by c12h22o11_ »

This is the backend code:

public function reveal() {
self::setAjaxMode();
$deck = self::getArg("deck", AT_alphanum, true );
$this->game->waterReveal($deck);
self::ajaxResponse();
}


This is the js code

this.ajaxcall( "/distilledsugartwo/distilledsugartwo/reveal.html", {
deck: D,
deck2: decks[ii],
deck3: decks[ii],
deck4: "fiddlesticks",
trigger: args ? args.trigger : null,
})
User avatar
RicardoRix
Posts: 2117
Joined: 29 April 2012, 23:43

Re: "e.hitch is not a function" on my ajax calls. anyone understand it?

Post by RicardoRix »

The ajax call looks a bit odd.
You're only passing args, there is no ending ; and you don't have lock: true in the args.
Not really sure what the consequences would be though.

This is pretty much taken straight from the example in the new project code they give you:

Code: Select all

	var args = {};
		args['lock'] = true;		
		args['dodge'] = dodge;		
		args['prank'] = prank;		
		
		this.ajaxcall( "/auntiemildred/auntiemildred/gaindodgeprank.html", args, this, function( result ) {}, function( is_error) {} );		   
Post Reply

Return to “Developers”