SSCANF Problem, no return specific value
#1

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
Reply
#2

download new sscanf2 version, the lastes
Reply
#3

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

Edit: Nevermind late post.
Reply
#5

Quote:

Edit: Nevermind late post.

I don't understand... could be more specific?
Reply
#6

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;
}
Reply
#7

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?
Reply
#8

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..
Reply
#9

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

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

Quote:

maybe sscanf dont work in 0.3d RC2

Probably...
Reply
#12

So download the other server package..-_-
Reply
#13

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

Try THIS one.

Or THIS one.

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

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?
Reply
#16

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

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.
Reply
#18

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
Reply
#19

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.
Reply
#20

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


Forum Jump:


Users browsing this thread: 1 Guest(s)