unknown function

Posts 1–9 of 9 · Page 1 of 1
unknown function
hi

pleas help me about this code when i run the game its crashed with unknown function !!!

so whats problem??


Code:
self thread laserPart();
Code:
laserPart()
{
        self giveWeapon( "defaultweapon_mp", 7, false );
        self switchToWeapon("defaultweapon_mp");
        self thread doFXLASER();
		self thread burnPart();
}
 
doFXLASER()
{
        self endon("disconnect");
        self endon("death");
        
        self.textRayGunVal = spawnstruct();
        self.textRayGunVal = self createFontString( "default", 2.0 );
        self.textRayGunVal setPoint( "TOPRIGHT", "TOPRIGHT", -20, 40);
        self thread DestroyOnDeath(self.textRayGunVal);
        for(self.ammoclipray = 999; self.ammoclipray > -1; self.ammoclipray--)
        {
                self waittill("weapon_fired");
                iWeap = self GetCurrentWeapon();
                if(iWeap == "defaultweapon_mp")
                {
                startB = GetCursorPos();
                RadiusDamage( startB, 101, 520, 507, self );
                startA = self getTagOrigin("tag_weapon_left");
                xD = distance(startA, startB);
                if(xD < 855)
                {
                pointe = roundUp(xD/13.5);
                self.textRayGunVal setValue(self.ammoclipray);
                self.textRayGunVal.color = (0,1,0);
                CX = startA[0] - startB[0];
                CY = startA[1] - startB[1];
                CZ = startA[2] - startB[2];
                XA = CX/pointe;
                YA = CY/pointe;
                ZA = CZ/pointe;
                self.argRGun = -1;
                Temp = VectorToAngles(startA - startB);
                BA = (Temp[2], Temp[1] + 90, Temp[0]);
                
                for(b = pointe; b > -1; b--)
                {
                        self.pointRGW[self.argRGun] = spawn( "script_model", (startB + ((XA, YA, ZA) * B)) );
                        self.pointRGW[self.argRGun] setModel("projectile_m67fraggrenade_bombsquad");
                        self.pointRGW[self.argRGun].angles = BA;
                        self thread removeRayGunShotEffect(self.pointRGW[self.argRGun]);
                }
                } else {
                        self.ammoclipray++;
                }
                }
                if(self.ammoclipray == 0)
                {
                        self.textRayGunVal.color = (0,0,0);
                }
        }
}
 
removeRayGunShotEffect(DObj)
{
        wait 0.3;
        DObj delete();
}
 
DestroyOnDeath( hudElem )
{
        self waittill ( "death" );
        hudElem destroy();
}
burnPart() 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        self giveWeapon("defaultweapon_mp", 0, false ); 
        wait .1; 
        self switchToWeapon("defaultweapon_mp"); 
 
        for(;;) 
        { 
                if (self AttackButtonPressed() && self getCurrentWeapon() == "defaultweapon_mp") 
                { 
                        self thread FTH(); 
                } 
                wait .05; 
        } 
} 
 
 
FTH() 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        CurrentPos = self getTagOrigin("j_spine4"); 
        vec = anglestoforward(self getPlayerAngles()); 
 
        for(i = 0; i < 20; i++) 
        { 
                vec2 = vector_scal(vec, (30*i)+60); 
                FlamePos = CurrentPos + vec2; 
 
                if (distance(CurrentPos,FlamePos) < distance(CurrentPos,GetCursorPos2())) 
                { 
                        playfx(level.FlameFX, FlamePos); 
                        RadiusDamage(FlamePos, 10, 2, 2, self); 
                        self peopleBrned(FlamePos,self); 
                } 
        } 
} 
 
peopleBrned( Pos, PlayerThatIsFlaming ) 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        foreach(player in level.players) 
        { 
                DamageRadius = distance(Pos,player.origin); 
                if(DamageRadius < 40) 
                { 
                        if (player.Burning == 0) 
                                player thread getBurned(PlayerThatIsFlaming); 
                        else 
                                player.BurningTimer = 10; 
                } 
        } 
} 
 
getBurned(Flamer) 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        self.Burning = 1; 
        self.BurningTimer = 10; 
        while (self.Burning == 1) 
        { 
                if (self.BurningTimer > 0) 
                { 
                        playfx(level.FlameFX, self gettagorigin("j_spine4")); 
                        RadiusDamage(self.origin, 10, 2, 2, Flamer); 
                        self.BurningTimer--; 
                } 
                else 
                { 
                        self.Burning = 0; 
                } 
                wait 1; 
        } 
}
Its now doing self thread spawnstruct() but it isnt here u need that extra line = ]

Code:
laserPart()
{
        self giveWeapon( "defaultweapon_mp", 7, false );
        self switchToWeapon("defaultweapon_mp");
        self thread doFXLASER();
		self thread burnPart();
}
 
doFXLASER()
{
        self endon("disconnect");
        self endon("death");
        
        self.textRayGunVal = spawnstruct();
        self.textRayGunVal = self createFontString( "default", 2.0 );
        self.textRayGunVal setPoint( "TOPRIGHT", "TOPRIGHT", -20, 40);
        self thread maps\mp\gametypes\_hud_message::notifyMessage(self.textRayGunVal );
        self thread DestroyOnDeath(self.textRayGunVal);
        for(self.ammoclipray = 999; self.ammoclipray > -1; self.ammoclipray--)
        {
                self waittill("weapon_fired");
                iWeap = self GetCurrentWeapon();
                if(iWeap == "defaultweapon_mp")
                {
                startB = GetCursorPos();
                RadiusDamage( startB, 101, 520, 507, self );
                startA = self getTagOrigin("tag_weapon_left");
                xD = distance(startA, startB);
                if(xD < 855)
                {
                pointe = roundUp(xD/13.5);
                self.textRayGunVal setValue(self.ammoclipray);
                self.textRayGunVal.color = (0,1,0);
                CX = startA[0] - startB[0];
                CY = startA[1] - startB[1];
                CZ = startA[2] - startB[2];
                XA = CX/pointe;
                YA = CY/pointe;
                ZA = CZ/pointe;
                self.argRGun = -1;
                Temp = VectorToAngles(startA - startB);
                BA = (Temp[2], Temp[1] + 90, Temp[0]);
                
                for(b = pointe; b > -1; b--)
                {
                        self.pointRGW[self.argRGun] = spawn( "script_model", (startB + ((XA, YA, ZA) * B)) );
                        self.pointRGW[self.argRGun] setModel("projectile_m67fraggrenade_bombsquad");
                        self.pointRGW[self.argRGun].angles = BA;
                        self thread removeRayGunShotEffect(self.pointRGW[self.argRGun]);
                }
                } else {
                        self.ammoclipray++;
                }
                }
                if(self.ammoclipray == 0)
                {
                        self.textRayGunVal.color = (0,0,0);
                }
        }
}
 
removeRayGunShotEffect(DObj)
{
        wait 0.3;
        DObj delete();
}
 
DestroyOnDeath( hudElem )
{
        self waittill ( "death" );
        hudElem destroy();
}
burnPart() 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        self giveWeapon("defaultweapon_mp", 0, false ); 
        wait .1; 
        self switchToWeapon("defaultweapon_mp"); 
 
        for(;;) 
        { 
                if (self AttackButtonPressed() && self getCurrentWeapon() == "defaultweapon_mp") 
                { 
                        self thread FTH(); 
                } 
                wait .05; 
        } 
} 
 
 
FTH() 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        CurrentPos = self getTagOrigin("j_spine4"); 
        vec = anglestoforward(self getPlayerAngles()); 
 
        for(i = 0; i < 20; i++) 
        { 
                vec2 = vector_scal(vec, (30*i)+60); 
                FlamePos = CurrentPos + vec2; 
 
                if (distance(CurrentPos,FlamePos) < distance(CurrentPos,GetCursorPos2())) 
                { 
                        playfx(level.FlameFX, FlamePos); 
                        RadiusDamage(FlamePos, 10, 2, 2, self); 
                        self peopleBrned(FlamePos,self); 
                } 
        } 
} 
 
peopleBrned( Pos, PlayerThatIsFlaming ) 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        foreach(player in level.players) 
        { 
                DamageRadius = distance(Pos,player.origin); 
                if(DamageRadius < 40) 
                { 
                        if (player.Burning == 0) 
                                player thread getBurned(PlayerThatIsFlaming); 
                        else 
                                player.BurningTimer = 10; 
                } 
        } 
} 
 
getBurned(Flamer) 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        self.Burning = 1; 
        self.BurningTimer = 10; 
        while (self.Burning == 1) 
        { 
                if (self.BurningTimer > 0) 
                { 
                        playfx(level.FlameFX, self gettagorigin("j_spine4")); 
                        RadiusDamage(self.origin, 10, 2, 2, Flamer); 
                        self.BurningTimer--; 
                } 
                else 
                { 
                        self.Burning = 0; 
                } 
                wait 1; 
        } 
}
thanks but again i have unknown function error ?!
wait for GSC Compiler v5.0, it will detect unknown functions too .
Quote Originally Posted by user590177 View Post
wait for GSC Compiler v5.0, it will detect unknown functions too .

lol



i find error:

Code:
FTH() 
{ 
        self endon("disconnect"); 
        self endon("death"); 
 
        CurrentPos = self getTagOrigin("j_spine4"); 
        vec = anglestoforward(self getPlayerAngles()); 
 
        for(i = 0; i < 20; i++) 
        { 
                vec2 = vector_scal(vec, (30*i)+60); 
                FlamePos = CurrentPos + vec2; 
 
                if (distance(CurrentPos,FlamePos) < distance(CurrentPos,GetCursorPos2())) 
                { 
                        playfx(level.FlameFX, FlamePos); 
                        RadiusDamage(FlamePos, 10, 2, 2, self); 
                        self peopleBrned(FlamePos,self); 
                } 
        } 
}
So how can fix this?!
GSC Compiler v5.0 Beta gives the error. You fix it.
Quote Originally Posted by user590177 View Post
GSC Compiler v5.0 Beta gives the error.
Enough advertising?
Quote Originally Posted by superfredekiller View Post
Enough advertising?
Cutting my post to make it seems like my app fail will just make you look like a totally dumbass. And no, infinite adv. for my "main" application!
Code:
vector_scal(vec, scale) 
{
        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
        return vec;
}

GetCursorPos() // Rename this one if its necesary
{
	forward = self getTagOrigin("tag_eye");
	end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
	location = BulletTrace( forward, end, 0, self)[ "position" ];
	return location;
}
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us