oldman80
Member
Okay, I have been playing around trying to figure out why this doesn't work for me. As far as I can tell, either the gump buttons are not passing the values to the OnResponse section of code (sorry, not sure what that is called and I am new to C#, am old, and its about 2 hours past my bedtime).
If that is not the case, then the OnResponse is not being called at all.
For the [ListInvasions command, I believe that the Invasions variable is not being set and therefore there is nothing to count and the result is a null value, and there isn't an IF statement to handle the null. I tried modifying the IF statement from
"if (Invasions.Count == 0)"
to
"if ((Invasions.Count == 0) || (Invasions.Count == null))"
But that also did not cause the gump to be shown when called. Am I missing something here?
PS. How do you get the "Code (C#):" boxes? I don't see that option. Apologies if this is not more clear. I'll try editing in the morning if I can make if sound better after some coffee. I am still trying to learn C# so any pointers would be appreciated.
If that is not the case, then the OnResponse is not being called at all.
For the [ListInvasions command, I believe that the Invasions variable is not being set and therefore there is nothing to count and the result is a null value, and there isn't an IF statement to handle the null. I tried modifying the IF statement from
"if (Invasions.Count == 0)"
to
"if ((Invasions.Count == 0) || (Invasions.Count == null))"
But that also did not cause the gump to be shown when called. Am I missing something here?
PS. How do you get the "Code (C#):" boxes? I don't see that option. Apologies if this is not more clear. I'll try editing in the morning if I can make if sound better after some coffee. I am still trying to learn C# so any pointers would be appreciated.