Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: random seeds? Pin
antrock10114-Mar-09 20:30
antrock10114-Mar-09 20:30 
AnswerRe: random seeds? Pin
Alan N15-Mar-09 1:17
Alan N15-Mar-09 1:17 
GeneralRe: random seeds? Pin
antrock10115-Mar-09 11:17
antrock10115-Mar-09 11:17 
GeneralRe: random seeds? Pin
Alan N15-Mar-09 13:40
Alan N15-Mar-09 13:40 
AnswerRe: random seeds? Pin
makumazan8415-Mar-09 2:27
makumazan8415-Mar-09 2:27 
GeneralRe: random seeds? Pin
antrock10115-Mar-09 11:28
antrock10115-Mar-09 11:28 
GeneralRe: random seeds? Pin
antrock10116-Mar-09 8:41
antrock10116-Mar-09 8:41 
GeneralRe: random seeds? Pin
antrock10116-Mar-09 14:16
antrock10116-Mar-09 14:16 
just an update i got it working with the threadtime scheduling thanks for the tip

however the 2nd bit of code still isnt working so i placed it in its own fucntion

/ rolling function
        public class Globals6
        {

            public static int dilemma = 0;
            public void random1()
            {
             
                Random dl = new Random(Environment.TickCount);
                Globals5.dilemma = dl.Next(1, 2);

                DialogResult res;

                if (Globals5.dilemma == 1)
                {

                    res = MessageBox.Show("Ban same sex marriage", "Dilemma", MessageBoxButtons.YesNo);
                    if (res == DialogResult.Yes)
                    {
                        Globals.notoriety -= 1;
                    }
                    else if (res == DialogResult.No)
                    {
                        Globals.notoriety += 1;
                    }

                    if (Globals5.dilemma == 2)
                    {

                        res = MessageBox.Show("Political protest, do you use essesive force?", "check", MessageBoxButtons.YesNo);
                        if (res == DialogResult.Yes)
                        {
                            Globals.notoriety -= 1;
                            
                        }
                        else if (res == DialogResult.No)
                        {
                            Globals.notoriety += 1;
                            
                        }

                    }
                }
                
            }

        }



and call it by putting random1(); in main how ever i get this error


Error	2	The name 'random1' does not exist in the current context	C:\Users\ant\Documents\Visual Studio 2008\Projects\game\game\Form1.cs	119	17	game

GeneralRe: random seeds? Pin
antrock10118-Mar-09 17:22
antrock10118-Mar-09 17:22 
QuestionSQL statement problem? Pin
Jon Henry14-Mar-09 11:43
Jon Henry14-Mar-09 11:43 
AnswerRe: SQL statement problem? Pin
Christian Graus14-Mar-09 11:45
protectorChristian Graus14-Mar-09 11:45 
Question[Message Deleted] Pin
jetspike14-Mar-09 10:49
jetspike14-Mar-09 10:49 
GeneralRe: Accessing datatable.rows on Form1 from From2 Pin
Luc Pattyn14-Mar-09 11:19
sitebuilderLuc Pattyn14-Mar-09 11:19 
AnswerRe: Accessing datatable.rows on Form1 from From2 Pin
Christian Graus14-Mar-09 11:51
protectorChristian Graus14-Mar-09 11:51 
QuestionImage Problem Pin
reza assar14-Mar-09 9:20
reza assar14-Mar-09 9:20 
AnswerRe: Image Problem Pin
Christian Graus14-Mar-09 9:31
protectorChristian Graus14-Mar-09 9:31 
AnswerRe: Image Problem Pin
Mohammad Dayyan14-Mar-09 11:25
Mohammad Dayyan14-Mar-09 11:25 
Questiondisplay image from SQL Server into Picture control Pin
Jassim Rahma14-Mar-09 7:31
Jassim Rahma14-Mar-09 7:31 
AnswerRe: display image from SQL Server into Picture control Pin
Luc Pattyn14-Mar-09 7:39
sitebuilderLuc Pattyn14-Mar-09 7:39 
AnswerRe: display image from SQL Server into Picture control Pin
Giorgi Dalakishvili14-Mar-09 7:43
mentorGiorgi Dalakishvili14-Mar-09 7:43 
AnswerRe: display image from SQL Server into Picture control Pin
Xmen Real 14-Mar-09 8:10
professional Xmen Real 14-Mar-09 8:10 
GeneralRe: display image from SQL Server into Picture control Pin
Jassim Rahma15-Mar-09 8:43
Jassim Rahma15-Mar-09 8:43 
GeneralRe: display image from SQL Server into Picture control Pin
Xmen Real 15-Mar-09 15:36
professional Xmen Real 15-Mar-09 15:36 
QuestionDynamic buttons in flowlayout panel Pin
Jon Henry14-Mar-09 7:08
Jon Henry14-Mar-09 7:08 
AnswerRe: Dynamic buttons in flowlayout panel Pin
N a v a n e e t h14-Mar-09 7:42
N a v a n e e t h14-Mar-09 7:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.