Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: ::Script.log Replaced with ::print()  (Read 1391 times)

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
::Script.log Replaced with ::print()
« on: April 22, 2006, 01:43:12 PM »

I have replaced the ScriptManager::log method and opted for replacing the default print function used by squirrel.

This means, that you need to use ::print() to log messages now. This helps because, the error message generated (which is used for the exception is often times useless for debugging scuirrel scripts).. However, by overloading the print function, it now gives line numbers inside the wge.log file to where the problem lies :)
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
::Script.log Replaced with ::print()
« Reply #1 on: April 22, 2006, 01:44:29 PM »

Plus, it uses var args (...), so you can treat it like printf("something %i", someInt);
Logged