View Single Post
R1KO
Member
Join Date: Sep 2013
Old 09-01-2016 , 15:16   Re: New API and Syntax
Reply With Quote #762

PHP Code:
enum Types:
{
    
INVALID_TYPE 0,
}

methodmap Types
{
    public 
Types()
    {
        return 
view_as<Types>(5);

    
//        return INVALID_TYPE;
    
}

    public 
void Remove()
    {
        
// * how to assign a value INVALID_TYPE  to this?
    
}
}

public 
void OnPluginStart()
{
    
Types Type = new Types();    // why ? error 171: cannot use 'new' with non-object-like methodmap 'Types'
    
Types Type Types();
    
    
Type.Remove();    // * how to assign a value INVALID_TYPE to a Type in the method Remove


and when the value of the index variable "this"?
And then he writes
PHP Code:
LogMessage("this.Index: %i"this.Index); 
Quote:
error 105: cannot find method or property Types.Index

Last edited by R1KO; 09-01-2016 at 15:37.
R1KO is offline
Send a message via Skype™ to R1KO