• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Find the number into a text
#1
Hi  !  I need your help.  I want to find the number in a random text.

 For example:

Code:
#include <open.mp>

main()
{
    new randomText.1[50] = " Hi, my name is John and I am 29 years old.";
    new randomText.2[50] = " Hey there, I choose the number 17.");
    new randomText.3[50] = " I want to be the number 1.");

    new Age; 
    new LottoNr;
    new Number;
    
    FindTheNumber(randomText.1, Age);
    printf(" Number found: %d", Age);

    FindTheNumber(randomText.2, LottoNr);
    printf(" Number found: %d", LottoNr);

    FindTheNumber(randomText.3, Number);
    printf(" Number found: %d", Number);

}
  Reply


Messages In This Thread
Find the number into a text - by BotLevel.Bobu - 2023-11-29, 09:42 PM
RE: Find the number into a text - by denNorske - 2023-12-05, 10:03 AM

Forum Jump: