HdVaderII Posted July 9, 2008 Share Posted July 9, 2008 I found this script in the Scripting tutorials, yet when I paste it into my KT text editor, save as a .nss file, and compile, I get a syntax error at line four: Error: Syntax Error at "object" void main() { object oPc=GetFirstPC(); object oRand=GetNearestObject(OBJECT_TYPE_ALL,oPc,1); location lRand=GetLocation(oRand); ApplyEffectAtLocation(0,EffectVisualEffect(3003),lRand,0.0f); PlayRumblePattern(1); } Any help? Link to comment Share on other sites More sharing options...
Silveredge9 Posted July 9, 2008 Share Posted July 9, 2008 I just tried the script and it compiled fine. And looking at the script, nothing seems out of order either. Link to comment Share on other sites More sharing options...
HdVaderII Posted July 9, 2008 Author Share Posted July 9, 2008 I'm still getting the problem. I'm copying the script correctly. Could it be due to the fact that I'm doing this in TSL? I know that's not likely but you never know... Link to comment Share on other sites More sharing options...
Silveredge9 Posted July 10, 2008 Share Posted July 10, 2008 I'm still getting the problem. I'm copying the script correctly. Could it be due to the fact that I'm doing this in TSL? I know that's not likely but you never know... The "PlayRumblePattern(1);" function is used in a number of places in the original K1. I can't remember it being used at all in TSL, so the function might have been removed. The script should work if you take that function out, it just means the screen won't shake when the explosions trigger. Link to comment Share on other sites More sharing options...
HdVaderII Posted July 10, 2008 Author Share Posted July 10, 2008 I just re-copied it from the tutorial again, and now it works. Thanks for your help silver. Sorry if I wasted your time. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.