Jump to content

can't I get a long long data type?


Recommended Posts

  • Active+ Member

hello I need help with something. I can't get long long data with cmd.

the data I sent is like this;

a = 30000754

b= 75

net.SendChatPacket("/sayi "+ str(a) + " " + str(b))

code from which I received data;

ACMD(do_sayi)

{

    char arg1[256], arg2[256];

    two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));



    if (!*arg1 || !*arg2)

        return;



    if (!ch->IsPC())

        return;





    ch->ChatPacket(CHAT_TYPE_INFO, "1.%d 2.%d", arg1, arg2 );

}

The value it gives me

1.-1077968457 2.-1076298457

can someone write me a code for this? Thank you.

 

 

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Active+ Member
9 hours ago, meneleos said:

 

arg1 & arg2 not int.

try:

ch->ChatPacket(CHAT_TYPE_INFO, "1. %s 2.%s", arg1, arg2 );

or :


ch->ChatPacket(CHAT_TYPE_INFO, "1. %s 2.%s", atoi(arg1), atoi(arg2) );

Yes it worked. but I don't understand,% s is being used for the string data type?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 3

      Crystal Metinstone

    2. 3

      Feeding game source to LLM

    3. 113

      Ulthar SF V2 (TMP4 Base)

    4. 3

      Feeding game source to LLM

    5. 0

      Target Information System

    6. 3

      Feeding game source to LLM

    7. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.