Spoiler
Begin Mf_card_tableShort ConVarShort ButtonIf ( OnActivate ) If ( ConVar == 0 ) MessageBox, "Lets play some cards!", "Continue" Set ConVar to 1 EndIfEndIfIf ( ConVar ) Set Button to GetButtonPressed If ( Button == -1 ) Return ElseIf ( Button == 0 ) Set ConVar to 2 EndifEndifIf ( ConVar == 2 ) MessageBox, "What would you like to do?", "Deal'm", "Quit" Set ConVar to 3EndifIf ( ConVar == 3 ) Set Button to GetButtonPressed If ( Button == -1 ) Return ElseIf ( Button == 0 ) Set ConVar to 4 Else Set ConVar to 0 EndIfEndifIf ( ConVar == 4 ) MessageBox, "test test test" Set ConVar to 0EndifEnd
When I activate it, it runs fine up until it gets to
EDIT: :banghead: Ok, I don't understand this at all.
Spoiler
Begin Mf_card_tableShort ConVarShort ButtonShort ConVar2If ( OnActivate ) If ( ConVar == 0 ) MessageBox, "Lets play some cards!", "Continue" Set ConVar to 1 EndIfEndIfIf ( ConVar ) Set Button to GetButtonPressed If ( Button == -1 ) Return ElseIf ( Button == 0 ) Set ConVar to 2 EndifEndifIf ( ConVar == 2 ) MessageBox, "What would you like to do?", "Deal", "Quit" Set ConVar2 to 1 Set ConVar to 0EndifIf ( ConVar2 == 1 ) Set Button to GetButtonPressed If ( Button == -1 ) Return ElseIf ( Button == 0 ) Set ConVar2 to 2 ElseIf ( Button == 1 ) Set ConVar to 0 Set ConVar2 to 0 EndIfEndifIf ( ConVar2 == 2 ) MessageBox, "test test test" Set ConVar2 to 0 Set ConVar to 0EndifEnd
It works fine now. I don't understand why I couldn't just pass that variable around. It stops working the third time it's changed.