[project1dev] Re: Script error on void map?

  • From: Alan Wolfe <alan.wolfe@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Sun, 21 Mar 2010 12:53:56 -0700

At this part:

==================================
 --if the player is close enough stop
  Intro_PlayerMovesToOldMan_OMX,MY,MZ = Model_GetPosition(Model);
  StopPX=PX-Intro_PlayerMovesToOldMan_OMX;
  StopPY=PY-Intro_PlayerMovesToOldMan_OMY;
  StopDistance=(StopPX*StopPX+StopPY*StopPY);
  --if the player is closer than 15 units away (squared distance check)
  if StopDistance<225 then
    Intro_PlayerMovesToOldMan=0;

  end
==================================

I think the 2nd line should be

 
Intro_PlayerMovesToOldMan_OMX,Intro_PlayerMovesToOldMan_OMY,Intro_PlayerMovesToOldMan_OMZ
= Model_GetPosition(Model);

Does that look right to you?  If so i'll check it in next checkin
On Sun, Mar 21, 2010 at 12:49 PM, Kent Petersen <kentkmp@xxxxxxxxx> wrote:

> Off the top of my head that is related to the player walking up to the old
> man when he calls the player over. OMY = old man Y value
>
> Would have to look deeper for more info
>
>
> On Sun, Mar 21, 2010 at 12:19 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:
>
>> Hey Kent,
>>
>> I was noticin the void map was having preformance problems (every second
>> or so it would hitch up for a sec) so i checked it out and the issue is that
>> something in there is spamming out an error message of:
>>
>> [Lua - ./Scripts/maps/TheVoid/TheVoid/voidmap.lua]
>> ./Scripts/maps/TheVoid/TheVoid/voidmap.lua:254: attempt to perform
>> arithmetic on global 'Intro_PlayerMovesToOldMan_OMY' (a nil value)
>>
>> Do you know anything about that guy?
>>
>
>

Other related posts: