10.09.2012, 14:50
Hi,
i have a big problem with a random arithmetical problem.
I create 3 variables:
Then a timer is invoked every eight minutes.
In OnPlayerText
(rechenergebnis is the computational results)
And now the errors/warnings:
(5449) : error 035: argument type mismatch (argument 2) //Line: if(!strcmp(text, rechenergebnis, false))
(17981) : warning 204: symbol is assigned a value that is never used: "rechenergebnis"
I hope you understand my problem
i have a big problem with a random arithmetical problem.
I create 3 variables:
Код:
new rechenzahl1 = 0; new rechenzahl2 = 0; new rechenergebnis = 0;
Код:
rechenzahl1 = random(101); rechenzahl2 = random(101); new str[256]; new zufall = random(2); switch(zufall) { case 0: { rechenergebnis = rechenzahl1+rechenzahl2; format(str,sizeof(str),"[RECHNEN]: Bla bla '{969696}%d+%d{00FF78}' in bla bla bla",rechenzahl1,rechenzahl2); SendClientMessageToAll(0x00FF78FF,str); } case 1: { rechenergebnis = rechenzahl1-rechenzahl2; format(str,sizeof(str),"[RECHNEN]: Bla bla '{969696}%d-%d{00FF78}' in bla bla bla",rechenzahl1,rechenzahl2); SendClientMessageToAll(0x00FF78FF,str); } }
Код:
if(!strcmp(text, rechenergebnis, false)) { if(Reaktion == 2) { GewinntReaktion(playerid); } return 1; }
And now the errors/warnings:
(5449) : error 035: argument type mismatch (argument 2) //Line: if(!strcmp(text, rechenergebnis, false))
(17981) : warning 204: symbol is assigned a value that is never used: "rechenergebnis"
I hope you understand my problem