Raised This Month: $51 Target: $400
 12% 

Solved wc3 race compiler error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Yevorz
Junior Member
Join Date: Sep 2016
Old 09-25-2016 , 22:14   wc3 race compiler error
Reply With Quote #1

Trying to compile my custom race with spcomp through command prompt but i got these errors

\DEV\scripting\War3craftP\include\handles.inc (83) : error 114: missing type, or constructor must have the same name as methodmap "Handle"

\DEV\scripting\War3craftP\include\handles.inc (83) : error 001: expected token: "{", but found "="

\DEV\scripting\War3craftP\include\handles.inc (83) : error 029: invalid expression, assumed zero

\DEV\scripting\War3craftP\include\handles.inc (83) : fatal error 190: too many error messages on one line

I tried to use normal compiler but got these same errors for every file in the folder so i thought id give it a shot through spcomp but same errors Any help appreciated

Last edited by Yevorz; 09-26-2016 at 20:54.
Yevorz is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 09-26-2016 , 05:24   Re: wc3 race compiler error
Reply With Quote #2

Lets magically fix your code with our mind reading powers.

In all seriousness, please share some code!
__________________
Neuro Toxin is offline
Yevorz
Junior Member
Join Date: Sep 2016
Old 09-26-2016 , 14:01   Re: wc3 race compiler error
Reply With Quote #3

Haha whoops. Forgot to add. although this error was repeated for every file when i ran compiler. ill try to run it again without this file and see if it repeats.

UPDATE: it still repeats the same code with a completely new compile environment without my file. although if anything is wrong on my file you could still let me know ;)

Code:
#include <sourcemod>
#include "W3SIncs/War3Source_Interface"
//test commit
public Plugin:myinfo = 
{
    name = "War3Source - Race - Brute Bruce",
    author = "JC",
    description = "Bruce is a very Brute man"
};

new thisRaceID;

new bool:RaceDisabled=true;
public OnWar3RaceEnabled(newrace)
{
    if(newrace==thisRaceID)
    {
        RaceDisabled=false;
    }
}
public OnWar3RaceDisabled(oldrace)
{
    if(oldrace==thisRaceID)
    {
        RaceDisabled=true;
    }
}

new Float:UnholySpeed[5] = {1.25, 1.45, 1.75, 1.95, 2.10};
new Float:BashChance[5]={0.0,0.09,0.15,0.25,0.35};
new DevotionHealth[5]={0,25,50,75,100};

new SKILL_HEALTH, SKILL_BASH, SKILL_SPEED;

public OnPluginStart()
{    
}

    {
        thisRaceID = War3_CreateNewRaceT("Brute");
        SKILL_HEALTH=War3_AddRaceSkillT(thisRaceID,"BruteStrength",false,4,"25/50/75/100");
        SKILL_BASH=War3_AddRaceSkillT(thisRaceID,"BruceSmash",false,4,"9/15/25/35%","0.2");

        SKILL_SPEED = War3_AddRaceSkillT(thisRaceID, "SwiftBruteness", false, 4, "20%");
             
        War3_CreateRaceEnd(thisRaceID);
        
        War3_AddSkillBuff(thisRaceID, SKILL_HEALTH, iAdditionalMaxHealth, DevotionHealth);
        War3_AddSkillBuff(thisRaceID, SKILL_SPEED, fMaxSpeed, UnholySpeed);
        War3_AddSkillBuff(thisRaceID, SKILL_BASH, fBashChance, BashChance);
}

public OnWar3EventSpawn(client)
{
    if(RaceDisabled)
    {
        return;
    }

    ActivateSkills(client); //DO NOT OPTIMIZE, ActivateSkills checks for skill level
}
public ActivateSkills(client)
{
    if(RaceDisabled)
    {
        return;
    }

    new skill_devo=War3_GetSkillLevel(client,thisRaceID,SKILL_HEALTH);
    if(skill_devo)
    {
        // Devotion Aura
        new Float:vec[3];
        GetClientAbsOrigin(client,vec);
        vec[2]+=20.0;
        new ringColor[4]={0,0,0,0};
        new team=GetClientTeam(client);
        if(team==2)
        {
            ringColor={255,0,0,255};
        }
        else if(team==3)
        {
            ringColor={0,0,255,255};
        }
        TE_SetupBeamRingPoint(vec,40.0,10.0,BeamSprite,HaloSprite,0,15,1.0,15.0,0.0,ringColor,10,0);
        TE_SendToAll();
        
    }
}


//public OnGenericSkillLevelChanged(client,generic_skill_id,newlevel,Handle:generic_Skill_Options,customer_race,customer_skill)
//{
    //new String:name[32];
    //GetClientName(client,name,sizeof(name));
    //DP("client %d %s genericskill %d level %d, cus %d %d",client,name,generic_skill_id,newlevel,customer_race,customer_skill);
//}

new TPFailCDResetToRace[MAXPLAYERSCUSTOM];
new TPFailCDResetToSkill[MAXPLAYERSCUSTOM];

public OnUltimateCommand(client,race,bool:pressed)
{
    //DP("ult pressed");
    if( pressed  && ValidPlayer(client,true) && !Silenced(client))
    {
        new Handle:genericSkillOptions;
        new Float:distances[5];
        new customerrace,customerskill;
    
        new level=W3_GenericSkillLevel(client,GENERIC_SKILL_TELEPORT,genericSkillOptions,customerrace,customerskill);
        //DP("level CUSrace CUSskill %d %d %d",level,customerrace,customerskill);
        if(level)
        {
            GetArrayArray(genericSkillOptions,    0,distances);
            new Float:cooldown=GetConVarFloat(GetArrayCell(genericSkillOptions,1));
            //DP("cool %f",cooldown);
            if(War3_SkillNotInCooldown(client,customerrace,customerskill,true)) //not in the 0.2 second delay when we check stuck via moving
            {
                TPFailCDResetToRace[client]=customerrace;
                TPFailCDResetToSkill[client]=customerskill;
                new bool:success = Teleport(client,distances[level]);
                if(success)
                {
                    //new Float:cooldown=GetConVarFloat(ultCooldownCvar);
                    War3_CooldownMGR(client,cooldown,customerrace,customerskill,_,_);
                }
            }
        
        }
        else if(War3_GetRace(client)==customerrace)
        {
            W3MsgUltNotLeveled(client);
        }
    }

}



public OnSkillLevelChanged(client,race,skill,newskilllevel)
{
    if(RaceDisabled)
    {
        return;
    }

    if(race==thisRaceID)
    {
        ActivateSkills(client); //on a race change, this is called 4 times, but that performance hit is insignificant
    }
}

Last edited by Yevorz; 09-26-2016 at 14:04.
Yevorz is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 09-26-2016 , 16:23   Re: wc3 race compiler error
Reply With Quote #4

I think, but I'm not sure, that you're using a newer version of spcomp and set of SM's includes that are older. If the SM includes you're compiling against are from before 1.8 and the compiler is 1.8 or newer, you'll probably get the errors you posted.
Fyren is offline
Yevorz
Junior Member
Join Date: Sep 2016
Old 09-26-2016 , 17:48   Re: wc3 race compiler error
Reply With Quote #5

using last successful build of wc3
http://ownageclan.com/builds/lastSuc...Build/archive/

and latest build of sourcemod ( 1.8 ) so what do i need to go backward? i assumed the 2 most recent builds would be compatible but if not what version would be?

Last edited by Yevorz; 09-26-2016 at 17:49.
Yevorz is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 09-26-2016 , 18:02   Re: wc3 race compiler error
Reply With Quote #6

I have no idea which versions of anything W3S is bundling. If you're using the compiler from 1.8, use the includes from 1.8.
Fyren is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 09-26-2016 , 19:30   Re: wc3 race compiler error
Reply With Quote #7

I see:

Code:
public OnPluginStart()
{    
}

    {
        thisRaceID = War3_CreateNewRaceT("Brute");
        SKILL_HEALTH=War3_AddRaceSkillT(thisRaceID,"BruteStrength",false,4,"25/50/75/100");
        SKILL_BASH=War3_AddRaceSkillT(thisRaceID,"BruceSmash",false,4,"9/15/25/35%","0.2");

        SKILL_SPEED = War3_AddRaceSkillT(thisRaceID, "SwiftBruteness", false, 4, "20%");
             
        War3_CreateRaceEnd(thisRaceID);
        
        War3_AddSkillBuff(thisRaceID, SKILL_HEALTH, iAdditionalMaxHealth, DevotionHealth);
        War3_AddSkillBuff(thisRaceID, SKILL_SPEED, fMaxSpeed, UnholySpeed);
        War3_AddSkillBuff(thisRaceID, SKILL_BASH, fBashChance, BashChance);
}
Which should be:

Code:
public OnPluginStart()
{    
        thisRaceID = War3_CreateNewRaceT("Brute");
        SKILL_HEALTH=War3_AddRaceSkillT(thisRaceID,"BruteStrength",false,4,"25/50/75/100");
        SKILL_BASH=War3_AddRaceSkillT(thisRaceID,"BruceSmash",false,4,"9/15/25/35%","0.2");

        SKILL_SPEED = War3_AddRaceSkillT(thisRaceID, "SwiftBruteness", false, 4, "20%");
             
        War3_CreateRaceEnd(thisRaceID);
        
        War3_AddSkillBuff(thisRaceID, SKILL_HEALTH, iAdditionalMaxHealth, DevotionHealth);
        War3_AddSkillBuff(thisRaceID, SKILL_SPEED, fMaxSpeed, UnholySpeed);
        War3_AddSkillBuff(thisRaceID, SKILL_BASH, fBashChance, BashChance);
}
__________________
Neuro Toxin is offline
Yevorz
Junior Member
Join Date: Sep 2016
Old 09-26-2016 , 20:53   Re: wc3 race compiler error
Reply With Quote #8

Thanks for yalls help. I used the 1.7 version to compile and those errors went away although that error did come up Neuro when i went to compile and i fixed it thanks again!
Yevorz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode