Mystic Software Forums

Mystic Software => General Discussion => Topic started by: Ichigatsu on December 21, 2005, 02:07:44 PM

Title: (no subject)
Post by: Ichigatsu on December 21, 2005, 02:07:44 PM
My shop program is really ____ up. Would someone be so kind and find this glich that keeps it in loop (repeat)

PS- It's kind of, but not really a shop code, it's in a Pub, and ordering a drank. But your reply will be a starting point for a better code. Also if you could find a better code program please reply with it in this forum spot please. ^_^

-- My .prg --

Mwin("Why hello sugar, wanna drank of Golden Moonshine? Costs only 50 GP.")
Mwin("1 - Yes")
mwin("2 - No")
Mwin("3 - I just want to chat")
#wait(a!)

#if(a!==1)
{
mwincls()
getgp(gold!)
if(gold!<50)
{
mwincls
mwin("Sorry sug, ya don't have enough GP")
wait()
done()
}
if(gold!>=50)
{
Mwin(" Here ya go sugar")
Inn()
wait()
mwincls
done()
}

#if(a!==2)
{
mwincls()
Mwin(" Aww, that's just too bad")
wait()
done()
}

#if(a!==3)
{
mwincls()
Mwin("Some towns are still prejudice about demons living sidebyside with humans!")
wait()
Mwin("Luckly this village has an open mind and heart for our kind.")
wait()
done()
}
Title: (no subject)
Post by: Xorlak on December 22, 2005, 11:05:03 AM
You want:

#wait(a$)

and

#if(a$=="1")

etc.

Values from the keyboard are taken as literal values, not numerical, even if the key is a number.