while(distance(self,skrzynka)<100) if(self usebuttonpressed())
{
self iprintlnbold("TEST");
}
so many errors...
you MUST be sure that self is defined and a player first!, you call this upron gamestart (because you precahced the model there...) so there might be NO player -> self is NOT the player there!
but here is a corrected while-loop..
Code:
while( isDefined( self ) && isPlayer( self ) )
{
wait( 0.05 );
if( !self useButtonPressed() )
continue;
else if( distanceSquared( self.origin , blabla.origin ) > 100 * 100 )
continue;
self iPrintLnBold( "TEST" );
}