Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

Sir Ementaler

Member Since 09 Mar 2013
Online Last Active Today, 05:00 AM

Posts I've Made

In Topic: Bug in type-casting

13 December 2014 - 04:39 AM

From your code it looks like your problem is much more prosaic in nature: you're probably trying to call a non-const method on a const handle. That is what the error indicates (no matching signatures to 'Label::setText(string) const') and it's why the other part of your code works ("const Widgets::Label @mClock" vs "Widgets::Label @Clock").

In Topic: Including namespace on GetTypeDeclaration()

05 November 2014 - 01:52 AM

I had a similar issue recently involving asIScriptFunction::GetDeclaration. While personally I certainly don't mind it explicitly stating the global namespace, it appeared as if asIScriptModule::GetFunctionByDecl was unable to interpret it. That means that neither including nor omitting the namespace always allows for identification of a function. Additionally, in this case the redundant "::" could prove more difficult to find and remove if one were to do that by hand, because it doesn't directly precede the string (and there could potentially be more occurrences of it, e.g. consider "foo::bar ::function(foo::bar)"). What I ended up doing was

asFunction->GetDeclaration(true, asFunction->GetNamespace()[0] != '\0', false)

which, honestly, looks like a terrible hack, but works. Either way, if not getting rid of the explicit preceding scope resolution operator, I would suggest at least modifying GetFunctionByDecl and possibly other similar functions accordingly, as they should most certainly be able to interpret declarations returned by other library functions.

In Topic: Default constructors vs default arguments

23 August 2013 - 07:14 AM

I'm almost entirely convinced that if somebody creates a constructor that can be called without any arguments, their intention is making it a default constructor. I was trying to imagine a case in which this could generate problems but I'm unable to. I'm pretty sure a constructor whose all arguments have default values should overtake all functions of a default constructor including creating temporary objects, even if only because creating a proper default constructor would become impossible due to a "multiple matching signatures" error. I'm not as experienced programmer and I won't be surprised if I had overlooked some downside of this solution so if you could explain why exactly it sounds like a bad idea, I would be thankful.

In Topic: No matching signatures to 'string::split(const string)'

15 August 2013 - 05:16 PM

It's Jazz Jackrabbit 2 Plus. In defense of its creators, the scripting manual they provided fulfills its main task, which is explaining JJ2+ implementation of AngelScript and the custom classes, functions and variables it adds. For basic AngelScript usage it only contains a link to the same manual I linked to in the OP, and this is the first time I found anything in it that failed to work within my script, hence my confusion.

In Topic: No matching signatures to 'string::split(const string)'

13 August 2013 - 06:13 PM

Alright, thanks, sorry for bothering you then. I write scripts for a game but I'm not the person responsible for its AngelScript implementation, which makes me occasionally incorrectly guess who I should report errors to.