Post: Whats wrong with this code?
11-30-2010, 01:10 PM #1
TheJaRniBoi
Why So Serious?
(adsbygoogle = window.adsbygoogle || []).push({}); Everytime i link this to the menu i get "unknown compile script error"

    doStingspas() 
{
self endon("death");
self iPrintlnBold("Stinger SPAS ready");
self takeWeapon(self getCurrentWeapon());
self giveWeapon("spas12_xmags_mp", 6, false);
self switchToWeapon("spas12_xmags_mp", 6, false);
for(;Winky Winky
{
self waittill( "weapon_fired" );
MagicBullet( "stinger_mp", self getTagOrigin("tag_eye"), self GetCursorPos(), self );
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
11-30-2010, 03:53 PM #2
dont post this code, post your mission with this added, this code is not wrong , maybe u linked it wrong to your menu.
11-30-2010, 04:21 PM #3
Cyborg Ninja
PS3 Security FtW !
Originally posted by CODGlitcha View Post
Everytime i link this to the menu i get "unknown compile script error"

    doStingspas() 
{
self endon("death");
self iPrintlnBold("Stinger SPAS ready");
self takeWeapon(self getCurrentWeapon());
self giveWeapon("spas12_xmags_mp", 6, false);
self switchToWeapon("spas12_xmags_mp", 6, false);
for(;Winky Winky
{
self waittill( "weapon_fired" );
MagicBullet( "stinger_mp", self getTagOrigin("tag_eye"), self GetCursorPos(), self );
}
}



Im sure for this part you need the actual

self GetCursorPos() Thread


Here it is try it with this somewhere in your patch

GetCursorPos()
{
forward = self getTagOrigin("tag_eye");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self)[ "position" ];
return location;
}

Ignore the guy above he obviously doesn't know what hes talking about.

It should work Claps

The following user thanked Cyborg Ninja for this useful post:

TheJaRniBoi
11-30-2010, 07:21 PM #4
Originally posted by packarda12 View Post
Im sure for this part you need the actual

self GetCursorPos() Thread


Here it is try it with this somewhere in your patch

GetCursorPos()
{
forward = self getTagOrigin("tag_eye");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self)[ "position" ];
return location;
}

Ignore the guy above he obviously doesn't know what hes talking about.

It should work Claps

as i can see, i fail :/
12-01-2010, 10:41 AM #5
Originally posted by packarda12 View Post
Im sure for this part you need the actual

self GetCursorPos() Thread


Here it is try it with this somewhere in your patch

GetCursorPos()
{
forward = self getTagOrigin("tag_eye");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self)[ "position" ];
return location;
}

Ignore the guy above he obviously doesn't know what hes talking about.

It should work Claps


You shouldn't need to add that to the missions. Its already somewhere else in the patch. Just like self GetStance() etc.
If it was missing it would say "error-unknown function".
Script compile error is something else..

I use this code and it works fine without adding the GetCursorPos() to my missions file.
12-01-2010, 11:38 AM #6
Originally posted by homer
you shouldn't need to add that to the missions. Its already somewhere else in the patch. Just like self getstance() etc.
If it was missing it would say "error-unknown function".
Script compile error is something else..

I use this code and it works fine without adding the getcursorpos() to my missions file.


uhu!!! So i wasnt wrong!
12-01-2010, 12:51 PM #7
Originally posted by Scrumilation View Post
uhu!!! So i wasnt wrong!


Its more likely how he has linked it to his menu .. Like you say, he needs to post the whole missions.gsc

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo