AudiDJ Posted August 6, 2014 Share Posted August 6, 2014 So I am very interested in the Project Saturn Tutorials put on by Jorn. However, I have run into a problem and cannot find a solution. I keep getting - error in Function 'Point'. argument #2 is 'string';'Entity' expected. -Here's my script: Script.player = "" --entity "Player" Script.rotationSpeed = 0.1 --float "Rotation Speed" Script.fireRate = 1.0 --float "Fire rate" Script.fireRateTimer = 0 Script.muzzleFlashLight = "" --entity "Muzzle Flash Light" Script.muzzleTime = 0.1 --float "muzzleTimer" Script.muzzleTimer = 0 function Script:UpdateWorld() self.entity:Point(self.player, 2, Time:GetSpeed() * self.rotationSpeed) self.fireRateTimer = self.fireRateTimer + (Time:GetSpeed()/100) self.muzzleTimer = self.muzzleTimer + (Time:GetSpeed()/100) if(self.fireRateTimer > self.fireRate) then self.muzzleFlashLight:Show() self.muzzleTimer = 0 end if(self.muzzleTimer > self.muzzleTime) then self.muzzleFlashLight:Hide() end end Thanks for taking a look. -Audi Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 6, 2014 Share Posted August 6, 2014 What do you have linked in as a the player? Quote Link to comment Share on other sites More sharing options...
Rick Posted August 6, 2014 Share Posted August 6, 2014 Just a side note that I always set --entity default values to nil. You have it as a string for a default value which doesn't really matter most likely but you aren't expecting it to be a string you are expecting it to be an entity object Script.player = nil --entity "Player" After making that change you'll probably get nil value received or something like that because you probably didn't drag anything in that field from the editor? That's what Aggror is trying to get at with his post. Quote Link to comment Share on other sites More sharing options...
AudiDJ Posted August 6, 2014 Author Share Posted August 6, 2014 Thanks guys! I got it figured out! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.