SA-MP Forums Archive
SSCANF Problem, no return specific value - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SSCANF Problem, no return specific value (/showthread.php?tid=303133)



SSCANF Problem, no return specific value - SuperChock - 11.12.2011

Hi... a have a serious problem with SSCANF. The variable values don't return a specific value... just, the U (ou R) type.

pawn Код:
YCMD:setadmin(playerid, params[], pHELPS)
{
    if(pBools[playerid] & pLogged && pLs[playerid][aLevel] >= 3 || IsPlayerAdmin(playerid))
    {
        new othersid,
            playerLV, LvL[20];

        if(sscanf(params, "ud", othersid, playerLV)) // U ou R for Player's ID, Nicks or NPCs
        {
            SendClientMessage(playerid, -1, "USE: /setadmin [ID/Nick] [0~3]");
            return 1;
        }
        // DEBUG
        SendPlayerMessage(playerid, -1, "othersid: %d / playerLVL: %d", othersid, playerLV);
        // DEBUG
If I type /setadmin 5 3 will return values as /setadmin 0 3 for any value entered in [ID/Nick].


Help me please, and sorry from my bad english


Re: SSCANF Problem, no return specific value - Speed - 11.12.2011

download new sscanf2 version, the lastes


Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

Yeah, I've downloaded sscanf2 for 0.3d Update 5 ;(


Re: SSCANF Problem, no return specific value - Steven82 - 11.12.2011

Edit: Nevermind late post.


Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

Quote:

Edit: Nevermind late post.

I don't understand... could be more specific?


Re: SSCANF Problem, no return specific value - Steven82 - 11.12.2011

Try using it without the "u" and use "d". Granted you'll only be able to enter the id of the target player but try to see if it works. And if it DOES, then you need to update your sscanf. Because "u" stopped working on 0.3d on older sscanf versions. You've already said you've updated but are you 100% positive you did?

pawn Код:
if(sscanf(params, "dd", othersid, playerLV))
{
    SendClientMessage(playerid, -1, "USE: /setadmin [ID] [0~3]");
    return 1;
}



Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

Ok. I will try with D. And... yes, I've downloaded SSCANF2 Update 5 FOR 0.3d here (or direct link: here).

(I'm using samp-server 0.3d RC2 800p)


Any other suggestions?


Re: SSCANF Problem, no return specific value - Steven82 - 11.12.2011

Did, you try the way i told you yet? If that doesn't work then i can't help you since i don't know your problem. But quick question, why are you using the 800 player slots server package. Do you really expect to get that many players when first building your script..


Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

No, my version is RC2 800p, but I'm using 50 slots.


Re: SSCANF Problem, no return specific value - Tigerkiller - 11.12.2011

download the newest server package and give it a try.
maybe sscanf dont work in 0.3d RC2


Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

Quote:

maybe sscanf dont work in 0.3d RC2

Probably...


Re: SSCANF Problem, no return specific value - Steven82 - 11.12.2011

So download the other server package..-_-


Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

I didn't find the old link.. can you give me?


Re: SSCANF Problem, no return specific value - Steven82 - 11.12.2011

Try THIS one.

Or THIS one.

** Incase people are wondering, those are direct links to files.sa-mp.com. **


Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

Thanks Steven82... I did the tests and proved that the SSCANF2 for 0.3d Update 5 has bugs when used in 0.3d RC2 800p. How could I report immediately this to Y_Less?


Re: SSCANF Problem, no return specific value - iTorran - 11.12.2011

Just a quick question.. Why are you using 800 player version?


Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

Quote:

No, my version is RC2 800p, but I'm using 50 slots.

"RC2-800p" is the name of Release, see:

I just updated the latest version released, believing that I would have less problems with bugs or anything like.


Re: SSCANF Problem, no return specific value - iTorran - 11.12.2011

RC2-800p is the name of the 800 slot release..
If you are going to use 50 slots then just get the normal 0.3d RC2


Re: SSCANF Problem, no return specific value - SuperChock - 11.12.2011

Quote:

If you are going to use 50 slots then just get the normal 0.3d RC2

But exists the RC2 release with 500 slots? See this.


Re: SSCANF Problem, no return specific value - Steven82 - 11.12.2011

Well i'm pretty sure by now that Y_Less know's about sscanf not working with the 800 slot server package.