User Tag List

Results 1 to 10 of 10

Thread: MSU's Individual Item Shop Script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.43%
    Link->Item[x] is already a bool, so there's no need to compare it against anything.

    if(Link->Item[I_ITEM] && I_TYPE == 0)

    Functionally, there's no difference between comparing a bool against true/false or 1/0; it's just more logical to compare two data of the same type.

  2. #2
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,565
    Level
    30
    vBActivity - Bars
    Lv. Percent
    52.33%
    Quote Originally Posted by Saffith View Post
    Link->Item[x] is already a bool, so there's no need to compare it against anything.

    if(Link->Item[I_ITEM] && I_TYPE == 0)

    Functionally, there's no difference between comparing a bool against true/false or 1/0; it's just more logical to compare two data of the same type.
    Yes, this is what I was talking about. The redundancy only bothers me a little, but compairing a bool to 0 or 1 could be confusing to people and if you are sharing a script the less confusing and easier it is to read the better. I do prefer letting a bool stand on it's own. I mean, you did it with Link->Input but not Link->Item? Be consistant.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social