ID:262552
 
Code: It should be so if the src(NPC) has 0 of any Gi, it will not be added into the list that is then viewed for questioning the usr.

verb
Talk()
set name="Talk"
set src in oview(1)
if(src.gi)
menu+="Black Gi"
if(src.gi1)
menu+="Blue Gi"
if(src.gi2)
menu+="Purple Gi"
if(src.gi3)
menu+="Orange Gi"
switch(input("Which type of Gi would you like to purchase?","Gi Seller") in menu)
if("Black Gi")
src.gi--
if("Blue Gi")
src.gi1--
if("Purple Gi")
src.gi2--
if("Orange Gi")
src.gi3--


Problem description: For some reason, although the src's gi is 0 or lower, they still become added into the list.

Try making the src.gi and such in the first set of if() statements have something such as src.gi==1, !src.gi, src.gi<=0, or something like that.
In response to Sinoflife
But when I make the if(src.gi) that means if src.gi is above zero. Thats what I want.
In response to Pure Fungeki
Pure Fungeki wrote:
But when I make the if(src.gi) that means if src.gi is above zero. Thats what I want.

No, that means if src.gi is not 0, or "" or null. if(-1) will end up being true, for example. You need to use the greater than (>) symbol to check if something is greater than 0.
In response to Jon88
Don't worry, I helped 'im fix it

The problem was not in the code he provided, just where the list var put at :)