Variables creating in void to use in other voids?

so im making an app thing and basically what it should be doing is creating 12 different variables (about) and outputting one var/another var. but whenever i tell it to do this, it comes out with some random number. like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
//starting with main.cpp, keep in mind that all of the .h's in the project don't have a corresponding .cpp

#include <iostream>
#include "Choosing Race.h"
#include "Choosing Class.h"
#include "HuF.h"


int main()
{

    chooseRace a;
    return 0;
}


//choosing race.h
#ifndef __combat_test__Choosing_Race__
#define __combat_test__Choosing_Race__

#include <iostream>
#include "HuF.h"
#include "Choosing Class.h"
using namespace std;
class chooseRace
{
public:
    chooseRace()
    {
        std::cout << "list of races:" <<endl;
        std::cout << "1.) Human" << endl;
        std::cout << "what is your race?: ";
        std::cin >> chooser;
        
        std::cout << endl;
        
        if (chooser == '1')
        {
            Chooseing_Class a;
        }
    }
private:
    char chooser;
    
 //choosing class.h

#ifndef __combat_test__Choosing_Class__
#define __combat_test__Choosing_Class__

#include <iostream>
#include "HuF.h"
using namespace std;
class Chooseing_Class
{
public:
    Chooseing_Class()
    {
        char choosec;
        char echooser;
        char echoosec;
        
        std::cout << "list of classes:" << endl;
        std::cout << "1.) Fighter" << endl;
        std::cout << "what is your class (type n for next 10)?: ";
        std::cin >> choosec;
        if (choosec == '1')
        {


            HuF fighterObj;
            fighterObj.HuFS(); //HuFS() is another void created in HuF.h which will come next.
            
            
            std::cout << "Build your enemy: List of races:" <<endl;
            std::cout << "1.) Human" << endl;
            std::cout << "what is your enemies race?: ";
            std::cin >> echooser;
            if (echooser == '1')
   
};

//HuF.h

#ifndef __combat_test__HuF__
#define __combat_test__HuF__

#include <iostream>
#include <cmath>
using namespace std;
class HuF
{
public:
    //all you and enemy fighter classes with stats
    
    // Human -> All Fighter Classes stats

    
    void HuFS()
    {
        
        std::cout << "what is your level?: ";
        std::cin >> ylvl;
        ylvl--;
        constant = (1+HuF::HumanFG[0][0]);
        i = pow(constant, ylvl);
        yhp = i * HumanFS[0];
        
        constant = (1+HumanFG[0][1]);
        i = pow(constant, ylvl);
        ymp = i * HumanFS[1];
        
        constant = (1+HuF::HumanFG[0][2]);
        i = pow(constant, ylvl);
        ypatk = i * HumanFS[2];
        
        constant = (1+HumanFG[0][3]);
        i = pow(constant, ylvl);
        ymatk = i * HumanFS[3];
        
        constant = (1+HumanFG[0][4]);
        i = pow(constant, ylvl);
        yratk = i * HumanFS[4];
        
        constant = (1+HumanFG[0][5]);
        i = pow(constant, ylvl);
        ypdef = i * HumanFS[5];
        
        constant = (1+HumanFG[0][6]);
        i = pow(constant, ylvl);
        ymdef = i * HumanFS[6];
        
        constant = (1+HumanFG[0][7]);
        i = pow(constant, ylvl);
        yrdef = i * HumanFS[7];
        
        constant = (1+HumanFG[0][8]);
        i = pow(constant, ylvl);
        ydb = i * HumanFS[8];
        
        constant = (1+HumanFG[0][9]);
        i = pow(constant, ylvl);
        yacc = i * HumanFS[9];
        
        constant = (1+HumanFG[0][10]);
        i = pow(constant, ylvl);
        ycr = i * HumanFS[10];
        
        constant = (1+HumanFG[0][11]);
        i = pow(constant, ylvl);
        yas = i * HumanFS[11];
}

 void EHuF()
    {
        
        std::cout << "what is your enemies level?: ";
        std::cin >> elvl;
        elvl--;
        constant = (1+HumanFG[0][0]);
        i = pow(constant, elvl);
        ehp = i * HumanFS[0];
        
        constant = (1+HumanFG[0][1]);
        i = pow(constant, elvl);
        emp = i * HumanFS[1];
        
        constant = (1+HumanFG[0][2]);
        i = pow(constant, elvl);
        epatk = i * HumanFS[2];
        
        constant = (1+HumanFG[0][3]);
        i = pow(constant, elvl);
        ematk = i * HumanFS[3];
        
        constant = (1+HumanFG[0][4]);
        i = pow(constant, elvl);
        eratk = i * HumanFS[4];
        
        constant = (1+HumanFG[0][5]);
        i = pow(constant, elvl);
        epdef = i * HumanFS[5];
        
        constant = (1+HumanFG[0][6]);
        i = pow(constant, elvl);
        emdef = i * HumanFS[6];
        
        constant = (1+HumanFG[0][7]);
        i = pow(constant, elvl);
        erdef = i * HumanFS[7];
        
        constant = (1+HumanFG[0][8]);
        i = pow(constant, elvl);
        edb = i * HumanFS[8];
        
        constant = (1+HumanFG[0][9]);
        i = pow(constant, elvl);
        eacc = i * HumanFS[9];
        
        constant = (1+HumanFG[0][10]);
        i = pow(constant, elvl);
        ecr = i * HumanFS[10];
        
        constant = (1+HumanFG[0][11]);
        i = pow(constant, elvl);
        eas = i * HumanFS[11];

fighterObj.FightStart();
}


    void FightStart()
    {
        ypdamt = ypatk;
        ypdamb = epdef;
        epdamt = epatk;
        epdamb = ypdef;
        int ypdamf = ypdamt/ypdamb;
        int epdamf = epdamt/epdamb;
        cout << ypdamf << endl;
        cout << epdamf << endl;
    }

    private:
//dont mind the comments on this array, they were simply to keep myself organized.
 double HumanFG[10][12] =
         //HP   MP     PA   MA   RA   PD    MD    RD    DB    ACC    CR     AS
    {   {.0701,.05997,.105,.092,.095,.061,.0590,.0490,.0571,.05107,.04512,.0177}, //F 0
        {.0741,.06021,.110,.094,.096,.075,.0670,.0540,.0602,.05137,.04551,.0175}, //SS 1
        {.0821,.06532,.125,.095,.097,.094,.0820,.0730,.0751,.05219,.04621,.0218}, //P 2
        {.0831,.06604,.120,.082,.093,.101,.0935,.0805,.0761,.05155,.04561,.0182}, //W 3
        {.0732,.06010,.124,.092,.095,.064,.0620,.0520,.0582,.05313,.05132,.0193}, //DW 4
        {.0781,.07204,.132,.093,.095,.072,.0680,.0550,.0601,.05352,.05324,.0224}, //GU 5
        {.0775,.06891,.141,.093,.095,.068,.0661,.0545,.0631,.05521,.05435,.0241}, //GL 6
        {.0751,.06013,.127,.093,.098,.067,.0611,.0621,.0573,.05120,.04822,.0179}, //2H 7
        {.0781,.06061,.131,.094,.098,.071,.0632,.0630,.0577,.05133,.05102,.0187}, //D 8
        {.0773,.06121,.137,.095,.099,.067,.0622,.0613,.0575,.05127,.05210,.0192}}; //R 9


int HumanFS[12] =
    {137,58,6,4,5,72,45,66,19,25,12,2};

    char chooser;
    char choosec;
    char echooser;
    char echoosec;


    int epdamt;
    int ypdamb;
    int epdamb;
    int ypdamt;

    int yhp;
    int ymp;
    int ypatk;
    int ypdef;
    int yratk;
    int yrdef;
    int ymatk;
    int ymdef;
    int ydb;
    int yacc;
    int ycr;
    int yas;

    int ehp;
    int emp;
    int epatk;
    int epdef;
    int eratk;
    int erdef;
    int ematk;
    int emdef;
    int ylvl;
    int edb;
    int eacc;
    int ecr;
    int eas;
    int x;
    double constant;
    double i;
    char chooseer;
    char chooseec;
    int elvl;
    int y;


this outputs this:


list of races:
1.) Human
what is your race?: 1

list of classes:
1.) Fighter
what is your class (type n for next 10)?: 1
what is your level?: 40
Build your enemy: List of races:
1.) Human
what is your enemies race?: 1
list of classes:
1.) Fighter
what is your enemies class (type n for next 10)?: 1
what is your enemies level?: 40
(lldb) 


lldb is basically it saying theres a mathematical issue somewhere. the problem is in the void FightStart() function. its dividing by a 0 when it shouldn't be. what should i do to get this to work.
ive also tried indexing variables into an array which didnt work either.
Last edited on
closed account (j3Rz8vqX)
It needs to be addressed that, just because variables share names, do not mean they are the same variables.

Below is a cleanup possibilities: (some debug printings were made)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
class HuF
{
public:
//Locals:
    int epdamt,ypdamb,epdamb,ypdamt;
    int yhp,ymp,ypatk,ypdef,yratk,yrdef,ymatk,ymdef,ylvl,ydb,yacc,ycr,yas;
    int ehp,emp,epatk,epdef,eratk,erdef,ematk,emdef,elvl,edb,eacc,ecr,eas;

    double constant;

    double HumanFG[10][12];
    int HumanFS[12];
    HuF()
    {
        const static double default_HumanFG[10][12] ={
            //HP   MP     PA   MA   RA   PD    MD    RD    DB    ACC    CR     AS
            {.0701,.05997,.105,.092,.095,.061,.0590,.0490,.0571,.05107,.04512,.0177}, //F 0
            {.0741,.06021,.110,.094,.096,.075,.0670,.0540,.0602,.05137,.04551,.0175}, //SS 1
            {.0821,.06532,.125,.095,.097,.094,.0820,.0730,.0751,.05219,.04621,.0218}, //P 2
            {.0831,.06604,.120,.082,.093,.101,.0935,.0805,.0761,.05155,.04561,.0182}, //W 3
            {.0732,.06010,.124,.092,.095,.064,.0620,.0520,.0582,.05313,.05132,.0193}, //DW 4
            {.0781,.07204,.132,.093,.095,.072,.0680,.0550,.0601,.05352,.05324,.0224}, //GU 5
            {.0775,.06891,.141,.093,.095,.068,.0661,.0545,.0631,.05521,.05435,.0241}, //GL 6
            {.0751,.06013,.127,.093,.098,.067,.0611,.0621,.0573,.05120,.04822,.0179}, //2H 7
            {.0781,.06061,.131,.094,.098,.071,.0632,.0630,.0577,.05133,.05102,.0187}, //D 8
            {.0773,.06121,.137,.095,.099,.067,.0622,.0613,.0575,.05127,.05210,.0192}  //R 9
        };
        const static int default_HumanFS[12] = {137,58,6,4,5,72,45,66,19,25,12,2};
        for(int i=0;i<10;++i)
        {
            for(int j=0;j<12;++j)
                HumanFG[i][j] = default_HumanFG[i][j];
        }
        for(int i=0;i<12;++i)
            HumanFS[i] = default_HumanFS[i];
    }
    void HuFS()
    {
        int *player[] = {&yhp,&ymp,&ypatk,&ymatk,&yratk,&ypdef,&ymdef,&yrdef,&ydb,&yacc,&ycr,&yas};
        std::cout << "what is your level?: ";
        std::cin >> ylvl;
        for(int i=0;i<12;++i)
        {
            constant = (1+HumanFG[0][i]);
            *player[i] = ((double)pow(constant, ylvl)) * HumanFS[i];
            cout<<*player[i]<<'\n';//Printing
        }
    }
    void EHuF()
    {
        int *enemy[] = {&ehp,&emp,&epatk,&ematk,&eratk,&epdef,&emdef,&erdef,&edb,&eacc,&ecr,&eas};
        std::cout << "what is your enemies level?: ";
        std::cin >> elvl;
        for(int i=0;i<12;++i)
        {
            constant = (1+HumanFG[0][i]);
            *enemy[i] = ((double)pow(constant, elvl))  * HumanFS[i];
            cout<<*enemy[i]<<'\n';//Printing
        }
    }
    void FightStart()
    {
        ypdamt = ypatk;
        ypdamb = ypdef;
        epdamt = epatk;
        epdamb = epdef;
        int ypdamf = ypdamt/ypdamb;
        int epdamf = epdamt/epdamb;
        cout << ypatk<<' '<<ypdamb<<' '<<ypdamf << endl;//???????PRINTING
        cout << epatk<<' '<<epdamb<<' '<<epdamf << endl;//???????PRINTING
    }
};

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Chooseing_Class
{
public:
    HuF fighterObj;//<-------Local to the object
    Chooseing_Class(){}
    void configure()
    {
        char choosec;
        char echooser;

        std::cout << "list of classes:" << endl;
        std::cout << "1.) Fighter" << endl;
        std::cout << "what is your class (type n for next 10)?: ";
        std::cin >> choosec;
        if (choosec == '1')
        {
            fighterObj.HuFS(); //HuFS() is another void created in HuF.h which will come next.

            std::cout << "Build your enemy: List of races:" <<endl;
            std::cout << "1.) Human" << endl;
            std::cout << "what is your enemies race?: ";
            std::cin >> echooser;
            if (echooser == '1')
            {
                fighterObj.EHuF();
            }
            fighterObj.FightStart();
        }
    }
};

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class chooseRace
{
public:
    Chooseing_Class a;//<-------Local to the object
    chooseRace()
    {
        configure();
    }
    void configure()
    {
        std::cout << "list of races:" <<endl;
        std::cout << "1.) Human" << endl;
        std::cout << "what is your race?: ";
        std::cin >> chooser;

        std::cout << endl;

        if (chooser == '1')
        {
            a.configure();
        }
    }
private:
    char chooser;
};


1
2
3
4
5
int main()
{
    chooseRace a;
    return 0;
}

Result:

list of races:
1.) Human
what is your race?: 1

list of classes:
1.) Fighter
what is your class (type n for next 10)?: 1
what is your level?: 10
269
103
16
9
12
130
79
106
33
41
18
2
Build your enemy: List of races:
1.) Human
what is your enemies race?: 1
what is your enemies level?: 5
192
77
9
6
7
96
59
83
25
32
14
2
16 96 0
9 130 0

Process returned 0 (0x0)   execution time : 7.229 s
Press any key to continue.


16/130 = 0, and 9/96=0.
Might want to rethink that.
(Attack was less than Defense: Attack/Defense)
that could be due to the fact that its an int not a double... thats why it prints 0... hmm.. any way. a few questions.

when you are doing int *player, is *player the name of the array or does the * have a certain meaning?

i tried using a for loop before but oddly it didnt work correctly for me for some reason. idk why...
im trying to think of a way to make combat... what i have right now dosnt work but maybe it could give you an idea of what im trying to do.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    void FightStart()
    {
        ypdamt = ypatk;
        ypdamb = ypdef;
        epdamt = epatk;
        epdamb = epdef;
        int ypdamf = (ypdamt*70)/ypdamb;
        int epdamf = (epdamt*70)/epdamb;
        int yHpNew;
        int eHpNew;
        
        while (yhp >= 0 && ehp >= 0)
        {
        cout << "you hit your enemy for " << ypdamf << " damage." << endl;
            eHpNew = ehp - ypdamf;
        cout << "your enemy now has " << eHpNew << " HP left" <<endl;
        
        cout << "your enemy hit you for " << epdamf << " damage." << endl;
            yHpNew = yhp - ypdamf;
        cout << "you now have " << yHpNew << " HP left" << endl;
            
            if (yHpNew >= 0 && eHpNew >= 0)
            {
                cout << "you hit your enemy for " << ypdamf << " damage." << endl;
                eHpNew - ypdamf;
                cout << "your enemy now has " << eHpNew << " HP left" <<endl;
                
                cout << "your enemy hit you for " << epdamf << " damage." << endl;
                yHpNew - ypdamf;
                cout << "you now have " << yHpNew << " HP left" << endl;
                if (eHpNew <= 0)
                {
                    cout << "you have slain your enemy." << endl;
                    break;
                }
                if (yHpNew <= 0)
                {
                    cout << "you are dead." << endl;
                    break;
                }
            }
        
    }
}


this outputs:


you hit your enemy for 29 damage.
your enemy now has 2030 HP left
your enemy hit you for 29 damage.
you now have 2030 HP left
you hit your enemy for 29 damage.
your enemy now has 2030 HP left
your enemy hit you for 29 damage.
you now have 2030 HP left
you hit your enemy for 29 damage.
your enemy now has 2030 HP left
your enemy hit you for 29 damage.
you now have 2030 HP left
you hit your enemy for 29 damage.
your enemy now has 2030 HP left
your enemy hit you for 29 damage.
you now have 2030 HP left


and it keeps going, never stopping.
i was thinking of doing this by inlining a new int function and have it return (yhp - epdamf) or return (ehp - ypdamf) depending on whos turn it is.
closed account (j3Rz8vqX)
Exactly, the result should be a double; cast it to double.

int *player[]
is an array of pointers to the variables; for organization purposes.

Some random example of ptr arrays and double casting:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
void print(int *ptrList[])
{
    for(int i=0;i<4;++i)
        cout<<*ptrList[i]<<' ';
    cout<<'\n';
}
void _print(int *i, int *j)
{
    double value = (double)*i / *j;
    cout<<*i<<"/"<<*j<<" = "<<value<<"\n\n";
}
void compare(int *&i, int *&j)
{
    int *k;
    if(*i>*j)
    {
        k = i;
        i = j;
        j = k;
    }
}
int main()
{
    int a=3, b=5, c=1, d=8;//Created 4 integer variables.

    int *ptrList[] = {&a,&b,&c,&d};//Grouped 4 integer variables.

    print(ptrList);//Printed 4 integer variables, unsorted.
    _print(ptrList[0],ptrList[1]);

    for(int i=0;i<4;++i)
        for(int j=i;j<4-i;++j)
            compare(*&ptrList[i],*&ptrList[j]);//Compare and sort pointer to address

    print(ptrList);//Printed 4 integer variables, sorted.
    _print(ptrList[0],ptrList[1]);

    cout<<"Press <enter> to exit: ";
    cin.get();
    return 0;
}
3 5 1 8
3/5 = 0.6

1 3 5 8
1/3 = 0.333333

Press <enter> to exit:


I skimmed over the code; might be what you want.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
void FightStart()
{
    ypdamt = ypatk;
    ypdamb = ypdef;
    epdamt = epatk;
    epdamb = epdef;
    int ypdamf = (ypdamt*70)/ypdamb;
    int epdamf = (epdamt*70)/epdamb;
    int yHpNew = yhp;
    int eHpNew = ehp;

    while (yhp >= 0 && ehp >= 0)
    {
        cout << "you hit your enemy for " << ypdamf << " damage." << endl;
        eHpNew = eHpNew - ypdamf;
        cout << "your enemy now has " << eHpNew << " HP left" <<endl;

        cout << "your enemy hit you for " << epdamf << " damage." << endl;
        yHpNew -= ypdamf;//Same logic as above, just illustrating
        cout << "you now have " << yHpNew << " HP left" << endl;
        if (eHpNew <= 0)
        {
            cout << "you have slain your enemy." << endl;
            break;
        }
        if (yHpNew <= 0)
        {
            cout << "you are dead." << endl;
            break;
        }
    }
}
Last edited on
perfect wow.

the way you did this created a few minor issues, in the case i was using (same levels same class same race), it would go down to the enemy hitting even tho the enemy has 0 hp.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    void FightStart()
{
        ypdamt = ypatk;
        ypdamb = ypdef;
        epdamt = epatk;
        epdamb = epdef;
        int ypdamf = (ypdamt*70)/ypdamb;
        int epdamf = (epdamt*70)/epdamb;
        int yHpNew = yhp;
        int eHpNew = ehp;
        
        while (yhp >= 0 && ehp >= 0)
    {
        cout << "you hit your enemy for " << ypdamf << " damage." << endl;
            eHpNew -= ypdamf;
        cout << "your enemy now has " << eHpNew << " HP left" <<endl;
        if (eHpNew <= 0)
        {
            cout << "you have slain your enemy." << endl;
            break;
        }
        else
        {
    
        
        cout << "your enemy hit you for " << epdamf << " damage." << endl;
            yHpNew -= epdamf;
            cout << "you now have " << yHpNew << " HP left" << endl;
        if (yHpNew <= 0)
        {
            cout << "you are dead." << endl;
            break;
        }
        else
        {
        
        }
        }
    }
}


that outputs exactly what i was looking for:


you hit your enemy for 29 damage.
your enemy now has 116 HP left
your enemy hit you for 29 damage.
you now have 116 HP left
you hit your enemy for 29 damage.
your enemy now has 87 HP left
your enemy hit you for 29 damage.
you now have 87 HP left
you hit your enemy for 29 damage.
your enemy now has 58 HP left
your enemy hit you for 29 damage.
you now have 58 HP left
you hit your enemy for 29 damage.
your enemy now has 29 HP left
your enemy hit you for 29 damage.
you now have 29 HP left
you hit your enemy for 29 damage.
your enemy now has 0 HP left
you have slain your enemy.
closed account (j3Rz8vqX)
The below would end properly when your new hp was set to or below 0. Previously, it was checking your maximum hp rather than current.

Example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
    while (yHpNew >= 0 && eHpNew >= 0)
    {
        cout << "you hit your enemy for " << ypdamf << " damage." << endl;
        eHpNew = eHpNew - ypdamf;
        cout << "your enemy now has " << eHpNew << " HP left" <<endl;
        if (eHpNew <= 0)
        {
            cout << "you have slain your enemy." << endl;
            break;
        }

        //Enemy cannot return fire, if already defeated:
        cout << "your enemy hit you for " << epdamf << " damage." << endl;
        yHpNew -= ypdamf;//Same logic as above, just illustrating
        cout << "you now have " << yHpNew << " HP left" << endl;
        if (yHpNew <= 0)
        {
            cout << "you are dead." << endl;
            break;
        }
    }

Have a good day.
Topic archived. No new replies allowed.