Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Little Unimportant Bug  (Read 3459 times)

0 Members and 3 Guests are viewing this topic.

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
Little Unimportant Bug
« on: June 29, 2003, 03:39:21 PM »

Jan, the Game.RegReadNumber() does not return null when the key doesn't exists, it returns 0 . I prefer the null but I can manage with the 0 anyway.
Logged

Click here to sign my sig!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Little Unimportant Bug
« Reply #1 on: June 30, 2003, 02:54:00 PM »

Well, it's null, but typed as an integer, i.e. it's zero :) I don't consider it a bug. I think it's better to use the default value in the RegRead* metods anyway.

Code: [Select]
var MyNumber = Game.RegReadNumber ("MyNumber", 123); // will return 123 if the value doesn't exist yet in the registry

var MyString = Game.RegReadString ("MyString", "blahblah"); // will return "blahblah" if the value doesn't exist yet in the registry
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.046 seconds with 21 queries.