Answered Error syntax why? (Source Blazed v2)

MagnateSnake13

Veteran
Messages
25
Reaction score
9
Points
783
Code:
Spawn_Link_Dog()
{
self endon("disconnect");
self endon("End_Link_k9");

if(self.LinkDog==0)
{
self iprintln("^5Link K9^7: [^2Enabled^7]");

for( ;; )
{
self.LinkDog=1;

dog_spawner = GetEnt( "dog_spawner", "targetname" );
level.dog_abort = false;

direction = self GetPlayerAngles();
direction_vec = AnglesToForward( direction );
eye = self GetEye("5");

scale = 80;
direction_vec.self = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
trace = bullettrace( eye, eye + direction_vec, 0, undefined );

nodes = GetNodesInRadius( trace["position"], 256, 0, 128, "Path", 8 );

dog = dog_manager_spawn_dog( self, self.team, node, 5,9,6 );
dog attach(self.model);
dog linkTo(self,"",(100,45,20),(0,360,0) 9,0); //////////////////////////////////////////////////// Error syntax why? here
dog.maxhealth = 999999;
dog.health = dog.maxhealth;
dog waittill("death");
self.LinkDog=0;
self notify("End_Link_k9");
}
}
else
self iprintln("^1Link K9 Already Spawned");
}
 
Last edited by a moderator:

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,093
Reaction score
2,881
Points
1,103
Code:
Spawn_Link_Dog()
{
self endon("disconnect");
self endon("End_Link_k9");

if(self.LinkDog==0)
{
self iprintln("^5Link K9^7: [^2Enabled^7]");

for( ;; )
{
self.LinkDog=1;

dog_spawner = GetEnt( "dog_spawner", "targetname" );
level.dog_abort = false;

direction = self GetPlayerAngles();
direction_vec = AnglesToForward( direction );
eye = self GetEye("5");

scale = 80;
direction_vec.self = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
trace = bullettrace( eye, eye + direction_vec, 0, undefined );

nodes = GetNodesInRadius( trace["position"], 256, 0, 128, "Path", 8 );

dog = dog_manager_spawn_dog( self, self.team, node, 5,9,6 );
dog attach(self.model);
dog linkTo(self,"",(100,45,20),(0,360,0) 9,0); //////////////////////////////////////////////////// Error syntax why? here
dog.maxhealth = 999999;
dog.health = dog.maxhealth;
dog waittill("death");
self.LinkDog=0;
self notify("End_Link_k9");
}
}
else
self iprintln("^1Link K9 Already Spawned");
}
The syntax error was caused by that you do not have a comma after the vector.
Code:
Spawn_Link_Dog()
{
    self endon("disconnect");
    self endon("End_Link_k9");

    if(self.LinkDog==0)
    {
    self iprintln("^5Link K9^7: [^2Enabled^7]");

        for(;;)
        {
            self.LinkDog=1;

            dog_spawner = GetEnt( "dog_spawner", "targetname" );
            level.dog_abort = false;

            direction = self GetPlayerAngles();
            direction_vec = AnglesToForward( direction );
            eye = self GetEye("5");

            scale = 80;
            direction_vec.self = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
            trace = bullettrace( eye, eye + direction_vec, 0, undefined );

            nodes = GetNodesInRadius( trace["position"], 256, 0, 128, "Path", 8 );

            dog = dog_manager_spawn_dog( self, self.team, node, 5,9,6 );
            dog attach(self.model);
            dog linkTo(self,"",(100,45,20),(0,360,0), 9,0); //////////////////////////////////////////////////// Error syntax why? here
            dog.maxhealth = 999999;
            dog.health = dog.maxhealth;
            dog waittill("death");
            self.LinkDog=0;
            self notify("End_Link_k9");
        }
    }
    else
        self iprintln("^1Link K9 Already Spawned");
}
Also the linto function do not have 6 inputs, it have just 4. So It probably won't work with bo2, also there are functions which aren't supported in bo2. But try it out.

Regards,
CabCon.
 

God

Skiddy
Messages
337
Reaction score
235
Points
818
creator said you can't just copy & paste it on original thread, so you'll have to put some work in.
 

DF_AUS

Moderator
Staff member
Head Staff Team
Donator
Messages
577
Reaction score
793
Points
878
The syntax error was caused by that you do not have a comma after the vector.
Code:
Spawn_Link_Dog()
{
    self endon("disconnect");
    self endon("End_Link_k9");

    if(self.LinkDog==0)
    {
    self iprintln("^5Link K9^7: [^2Enabled^7]");

        for(;;)
        {
            self.LinkDog=1;

            dog_spawner = GetEnt( "dog_spawner", "targetname" );
            level.dog_abort = false;

            direction = self GetPlayerAngles();
            direction_vec = AnglesToForward( direction );
            eye = self GetEye("5");

            scale = 80;
            direction_vec.self = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
            trace = bullettrace( eye, eye + direction_vec, 0, undefined );

            nodes = GetNodesInRadius( trace["position"], 256, 0, 128, "Path", 8 );

            dog = dog_manager_spawn_dog( self, self.team, node, 5,9,6 );
            dog attach(self.model);
            dog linkTo(self,"",(100,45,20),(0,360,0), 9,0); //////////////////////////////////////////////////// Error syntax why? here
            dog.maxhealth = 999999;
            dog.health = dog.maxhealth;
            dog waittill("death");
            self.LinkDog=0;
            self notify("End_Link_k9");
        }
    }
    else
        self iprintln("^1Link K9 Already Spawned");
}
Also the linto function do not have 6 inputs, it have just 4. So It probably won't work with bo2, also there are functions which aren't supported in bo2. But try it out.

Regards,
CabCon.
Cabcon,it is good that you help people,but with my source i done some ( rather silly ) steps so leechers cannot just copy and paste,honestly,how hard is it to take a look at some other released codes that use " linkTo " to see where the issue is in my code!!!
 

GoDModZ

Modder
Messages
63
Reaction score
113
Points
33
Cabcon,it is good that you help people,but with my source i done some ( rather silly ) steps so leechers cannot just copy and paste,honestly,how hard is it to take a look at some other released codes that use " linkTo " to see where the issue is in my code!!!

that good bro for people cant not just copy and paste I hate people like that :disappointed:
 
S

SeriousHD-

Guest
Cabcon,it is good that you help people,but with my source i done some ( rather silly ) steps so leechers cannot just copy and paste,honestly,how hard is it to take a look at some other released codes that use " linkTo " to see where the issue is in my code!!!
Thats a clever thing you did there... I know how to fix it, but why help them leech :tonguewink:
 

DF_AUS

Moderator
Staff member
Head Staff Team
Donator
Messages
577
Reaction score
793
Points
878
Thats a clever thing you did there... I know how to fix it, but why help them leech :tonguewink:
I want them to leech,otherwise the source would not have been released,however...i also want them to use a little effort,just as i did when i first started experimenting with Gsc,if i see an individual making an attempt,i will help them.
 
Top