Jump to content
SubSpace Forum Network

Numerical Input


Recommended Posts

Posted

I'm trying to do numerical inputs, i looked at the mervbot tutorial for this but i get this error.

 

C:Do-*BAD WORD*-ents and SettingsSeiferMy Do-*BAD WORD*-entsMERVBot PluginsBasicBotcommand.cpp(131) : error C2065: 'atoi' : undeclared identifier

 

Any idea's?

Posted

ok well i got the error sorted, but how can i make it check for a number and take effect on it, so i make !test 1 pm you with, You selected 1.

 

just so i have an example to work on

Posted

Wont work, as c->final is a string.

What will work is using '1', however, that is not a numeric value.

 

 

try #include for atoi(). In this case, you will want this:

int number = atoi(c->final); to sture the int value of c->final to number. Now use sendPirvate(p,"You sent "+String(number)); You can THEN use the switch statement to utilize the number.

Guest
This topic is now closed to further replies.
×
×
  • Create New...