Author Topic: (no subject)  (Read 1384 times)

Ichigatsu

  • Member
  • *
  • Posts: 27
    • View Profile
(no subject)
« 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()
}
« Last Edit: December 31, 1969, 06:00:00 PM by Ichigatsu »
\"Von eve das ou la gyumi. Ihyudor, Laj zhisk ah traubem brriaal, von das ou ttach gyumi klruger ba set\".

(and yes, it\'s a made up language)

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #1 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.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »