1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved Take number from int

Discussion in 'Development' started by fipteam, Nov 2, 2018.

  1. fipteam

    fipteam Spider

    Messages:
    14
    GitHub:
    ThePlastus
    Hello guys, I need help ;)

    My plugin returns answer in int(1) and I cant send this in message because: < photo >

    How I can remove int and say this answer as message?
     

    Attached Files:

  2. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    You can create string from int using
    PHP:
    $string = (string) $int;
    but in your code is null, not int
     
    fipteam likes this.
  3. fipteam

    fipteam Spider

    Messages:
    14
    GitHub:
    ThePlastus
    It works, thanks :D

     
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    If $int was originally null, (string) $int will just make it print "null". Otherwise you have got another error.
     
    SkySeven and GamakCZ like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.