I am using Small Basic, and I am rather new to programming. Here are my subroutines:
Sub MoneyClasses
If CurrentJob = "Cleaner" Then
Money = Money + 1
ElseIf CurrentJob = "Farmer" Then
Money = Money + 3
ElseIf CurrentJob = "Factory Worker" Then
Money = Money + 5
ElseIf CurrentJob = "Teacher" Then
Money = Money + 10
ElseIf CurrentJob = "Shopkeeper" Then
Money = Money + 20
ElseIf CurrentJob = "Doctor" Then
Money = Money + 30
ElseIf CurrentJob = "Soldier" Then
Money = Money + 25
ElseIf CurrentJob = "Officer" Then
Money = Money + 45
ElseIf CurrentJob = "General" Then
Money = Money + 100
ElseIf CurrentJob = "Supreme Leader" Then
Money = Money + 10000
EndIf
EndSub
Sub Work1
MoneyClasses()
Energy = Energy - 10
EndSub
Sub Sleep1
Energy = Energy + 10
Money = Money - 1
EndSub
Sub Stats1
TextWindow.WriteLine(" ")
TextWindow.WriteLine("You have " + Energy +" Energy.")
TextWindow.WriteLine("You have " + Money +" Won.")
TextWindow.Write(" ")
TextWindow.Read()
EndSub
Sub Menu
TextWindow.WriteLine("Current Job = " + CurrentJob + "")
TextWindow.WriteLine("Name = " + Name + "")
TextWindow.WriteLine("1 - Work")
TextWindow.WriteLine("2 - Sleep")
TextWindow.WriteLine("3 - Show Stats")
TextWindow.WriteLine(" ")
TextWindow.Write("What to do?: ")
PlayerInput = TextWindow.Read()
TextWindow.Clear()
EndSub
Yeah, I have absolutely no idea what is wrong. It's probably a minor error. I should also mention that the game is not fully finished yet, and by that I mean that I am not even halfway done. Just making the "basics".