Author Topic: Fonline Development Common Mistakes and Pitfalls.  (Read 3503 times)

Offline Slowhand

  • Go for the eyes, Boo! Go for the eyes!
Fonline Development Common Mistakes and Pitfalls.
« on: December 26, 2015, 07:12:52 pm »
As the title suggests, he is a collection of commonly made mistakes.

Good to know:

  • You can reload client scripts without restarting server. Very useful for unit testing function.

Common mistakes:

Pitfalls:

  • When a character is offline (and enough time passes?) or server resets, it's object (Critter& player) will be freed. Thus a Critter& player object can become a null reference exception on a timer, stucking some value indefinitely. Always use ID's instead of objects to get game variables, etc.
  • Using Critter.Stat[SK_SMALL_GUNS] for Skills, instead of Critter.Skill[SK_SMALL_GUNS].


OO related:
  • You cannot load sprites images in class constructor. Wasted 2 days on that.


« Last Edit: October 23, 2017, 11:35:57 pm by Slowhand »