Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualPapirosnik

Posted 12 January 2013 - 08:56 AM

Hi.

I've successfully registered all methods of my class.
Here is one of them.
void addNode(Node* node, const Point& pos);void addNode(Node* node, int x = 0, int y = 0);....r |= ase->RegisterObjectMethod(name, "void addNode(Node@, int, int)", asMETHODPR(T, addNode, (Node*, int, int), void), asCALL_THISCALL);IwAssert(SCRIPT, r >= 0);
when I'm trying to invoke this method in my angel code I get the following error:
*** ERROR:
No matching signatures to 'cScene::addNode(Texture@&, const uint, const uint)'
Candidates are:
void cScene::addNode(Node@, const Point&in)
void cScene::addNode(Node@, int, int)

Here is that angel code:
void onReset(){       Texture@ tex = ResManager.getTexture("back", "options");        Scene.addNode(tex, 320, 0);}
Why 320 and 0 are treated as const uint when I assume that they actually are int ?
Thanks.

PS. Just after posting this topic I've found my stupid mistake ). Texture@ cannot be casted to Node@. The shame on my head.
Excuse me, please, and delete this topic at all!

#2Papirosnik

Posted 12 January 2013 - 08:56 AM

Hi.

I've successfully registered all methods of my class.
Here is one of them.
void addNode(Node* node, const Point& pos);void addNode(Node* node, int x = 0, int y = 0);....r |= ase->RegisterObjectMethod(name, "void addNode(Node@, int, int)", asMETHODPR(T, addNode, (Node*, int, int), void), asCALL_THISCALL);IwAssert(SCRIPT, r >= 0);
when I'm trying to invoke this method in my angel code I get the following error:
*** ERROR:
No matching signatures to 'cScene::addNode(Texture@&, const uint, const uint)'
Candidates are:
void cScene::addNode(Node@, const Point&in)
void cScene::addNode(Node@, int, int)

Here is that angel code:
void onReset(){       Texture@ tex = ResManager.getTexture("back", "options");        Scene.addNode(tex, 320, 0);}
Why 320 and 0 are treated as const uint when I assume that they actually are int ?
Thanks.

PS. Just after posting this topic I've found my stupid mistake ). Texture@ cannot be casted to Node@. The shame on my head.
Excuse me, please, and delete this topic

#1Papirosnik

Posted 12 January 2013 - 08:44 AM

Hi.

I've successfully registered all methods of my class.
Here is one of them.
 

void addNode(Node* node, const Point& pos);
void addNode(Node* node, int x = 0, int y = 0);

....
r |= ase->RegisterObjectMethod(name, "void addNode(Node@, int, int)", asMETHODPR(T, addNode, (Node*, int, int), void), asCALL_THISCALL);
IwAssert(SCRIPT, r >= 0);

 

when I'm trying to invoke this method in my angel code I get the following error:

*** ERROR:
No matching signatures to 'cScene::addNode(Texture@&, const uint, const uint)'
Candidates are:
void cScene::addNode(Node@, const Point&in)
void cScene::addNode(Node@, int, int)

Here is that angel code:

void onReset()
{
       Texture@ tex = ResManager.getTexture("back", "options");
        Scene.addNode(tex, 320, 0);
}

Why 320 and 0 are treated as const uint when I assume that they actually are int ?
Thanks.





 


PARTNERS