Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now
- - - - -

Wrong cast between const uint and uint

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1 Papirosnik   Members   

125
Like
0Likes
Like

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.

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!

Edited by Papirosnik, 12 January 2013 - 08:56 AM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.