ItsMods

Full Version: AI Survival Edit Syntax Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi,
i have edit the AI Survival Mod! In version 0.1 all works fine but the same in version 0.2 make a syntax error! I dont find the error. At first i add Dragon's Breath from zxz0O0. Other Features i will add then the syntax error is fixed but i cant find. Please Help

The Mod in Attachment:

Bye
Maybe could post the code, which u have added so we can help u better?
Go ingame and write /logfile 1 in console start mod ..> start match and it will show you the error.
Thanks
now i know which codeline make the error but i cant find the Error in Line 412!
Here is a Screen from the Codeline and the Error in Black Ops.
The Screen is in the Attachment because i cant bind a link from ImageShack in the Post
you can post the directlink from imageshack, even without being registered there....(right click->show image)
Ok,
can someone help me ?
Is 'BulletsOnWall' its own function? If so, you can't declare a function within another function. I also see know opening brace for the function.

If you have defined the function but are calling it there, you need a semi-colon at the end of the line.
So now i have test it again and now i have a different error!

http://imageshack.us/photo/my-images/40/shot0000ak.jpg/

But there i didnt change any code!
Can you post more of the code? Don't take a screenshot of it, just copy paste relevant parts within 'php' tags, or just upload the whole _rank.gsc. First option would be better Tongue

EDIT: Just saw the code you posted.

Is this what it was meant to be like? I assume 'onJoinedSpectators' is a separate function to 'BulletsOnWall'. In that case, you missed a closing brace for 'onJoinedSpectators' and you have a backwards brace in the start of 'BulletsOnWall'. See if this fixed the problem

PHP Code:
onJoinedSpectators()
{
    
self endon("disconnect");

    for(;;)
    {
        
self waittill("joined_spectators");
        
self thread removeRankHUD();
        if(
isdefined(self.hud_score)) self.hud_score destroy(); 
        if(
isdefined(self.hud_menuhelp)) self.hud_menuhelp destroy();
        if(
isdefined(self.hud_roundinfo)) self.hud_roundinfo destroy();
    }
}
BulletsOnWall(flametype)
{
    
self endon("death");
    
self endon("disconnect");
    if(
flametype=="smokeonly")
    {
        
effect level._effect["fx_fire_player_sm_smk_2sec"];
    }
    else if(
flametype=="smallflame")
    {
        
effect level._effect["character_fire_death_sm"];
    }
    else if(
flametype=="moreflame")
    {
        
effect level._effect["character_fire_death_torso"];
    }
    else
    {
        
effect level._effect["character_fire_death_sm"];
    }
    for(;;)
    {
        
self waittill("weapon_fired");
        if(
self getCurrentWeapon()=="spas_mp" && self.hasDragonsBreath)
        {
                
forward self getTagOrigin("j_head");
                
end self thread vector_scal(anglesToForward(self getPlayerAngles()),1000000);
                
position BulletTrace(forwardend0self)["position"];
                
entity BulletTrace(forwardend0self)["entity"];
                if(
isDefined(entity.model))
                {
                    if(!
IsSubStr(entity.model"mp_body"))
                    {
                        if(
Distance(self.originposition)<512)
                        {
                            
PlayFx(effectposition);
                        }
                    }
                }
                else if(!
isDefined(entity.model))
                {
                    if(
Distance(self.originposition)<512)
                    {
                        
PlayFx(effectposition);
                    }
                }
        }
        
wait 0.5;
    }

U made a } isntead of { to start the function : )

EDIT:

Yes, pls post the code whee the error is.
Or u could use the syntaxChecker by SuperNova
Pages: 1 2 3