A little help with sscanf

Started by SA:MP, May 05, 2023, 05:38 AM

Previous topic - Next topic

0 Members and 7 Guests are viewing this topic.

SA:MP

A little help with sscanf

Hello.

I have a "problem" using multiple text string in sscanf params:



The cmd:


PHP Code:




 /sendinfo [JR_Junior] [Nick_Name] [No reason] [No details







PHP Code:




CMD:sendinfo(playerid,params[])

{

    new 
admin[25],account[25],reason[128],details[128];


    if(!
sscanf(params"s[25]s[25]s[128]s[128]",admin,account,reason,details))

    {

        
printf("%s | %s | %s | %s",admin,account,reason,details);

    }

    return 
1;








The result is:


PHP Code:




JR_Junior Nick_Name No reason No details 






Any solution?

Thank you!

Source: A little help with sscanf