SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/05/2012, 04:06 AM   #1
Deduction
Big Clucker
 
Deduction's Avatar
 
Join Date: Feb 2012
Location: Melbourne, Australia
Posts: 162
Reputation: 19
Default SSCANF Issue

Hey,
Im using a script which uses the plugin SSCANF
Its using Update 10 which is the recent one.

I am using 0.3e server and client and I put in the following and when I put in /test then any number it returns as 4.
pawn Code:
CMD:test(playerid, params[])
{

                new string[128], wid;
                if(sscanf(params, "d", wid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /test [number]");
                format(string, sizeof(string), "You put in %d", wid);
                SendClientMessageEx(playerid, COLOR_YELLOW, string);
                                return 1;
   
}

Do you know what is happening?
Deduction is offline   Reply With Quote
Old 14/05/2012, 04:11 AM   #2
James Coral
Gangsta
 
James Coral's Avatar
 
Join Date: Sep 2011
Location: In San Fierro
Posts: 533
Reputation: 4
Default Re: SSCANF Issue

Yes i know, dude can you show us the console text, there comes always the errors?
__________________
4System Gaming Community Is Back!
James Coral is offline   Reply With Quote
Old 14/05/2012, 04:19 AM   #3
Deduction
Big Clucker
 
Deduction's Avatar
 
Join Date: Feb 2012
Location: Melbourne, Australia
Posts: 162
Reputation: 19
Default Re: SSCANF Issue

No errors are being printed on console.
Im using ZCMD, and I thought that may need to be updated but it appears to have no errors.
Here are all the PAWN Includes
pawn Code:
#include <a_samp>
#include <streamer>
#include <a_zones>
#include <foreach>
#include <yom_buttons>
#include <djson>
#include <progress>
#include <YSI\y_timers>
#include <zcmd>
#include <sscanf2>

And the Include files are sscanf and streamer
Deduction is offline   Reply With Quote
Old 14/05/2012, 04:33 AM   #4
iRage
Huge Clucker
 
iRage's Avatar
 
Join Date: Aug 2011
Posts: 232
Reputation: 44
Default Re: SSCANF Issue

I've re-written it, the only difference I can notice is me using i instead of d which totally makes no sense if it's the problem, try it anyways 'n tell me the results you get.

pawn Code:
CMD:test(playerid, params[])
{
    new string[128], wid;
    if(sscanf(params, "i", wid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /test [number]");
    format(string, sizeof(string), "You put in %d", wid);
    SendClientMessageEx(playerid, COLOR_YELLOW, string);
    return 1;
}
__________________
Quote:
Originally Posted by iRage - My Releases

[GM] zGaming Roleplay [Scratch GM]
[FS] FireHell
[FS] Anti-AmmoHack
iRage is offline   Reply With Quote
Old 14/05/2012, 04:44 AM   #5
Deduction
Big Clucker
 
Deduction's Avatar
 
Join Date: Feb 2012
Location: Melbourne, Australia
Posts: 162
Reputation: 19
Default Re: SSCANF Issue

It just says You put in 4
Deduction is offline   Reply With Quote
Old 14/05/2012, 05:42 AM   #6
Deduction
Big Clucker
 
Deduction's Avatar
 
Join Date: Feb 2012
Location: Melbourne, Australia
Posts: 162
Reputation: 19
Default Re: SSCANF Issue

Any help? Please, I'll give whoever can help +REP
Deduction is offline   Reply With Quote
Old 14/05/2012, 05:48 AM   #7
Ash.
High-roller
 
Ash.'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,082
Reputation: 163
Default Re: SSCANF Issue

Try putting the sscanf include after the a_samp include. I had some odd problems like this a long time ago, and this is how I sorted it.
__________________
TruckingWorld
Work, Play, Make Friends
Written from scratch, and originally released in 2011, play today!
Visit the forum | Play the game
Ash. is offline   Reply With Quote
Old 14/05/2012, 05:51 AM   #8
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,314
Reputation: 720
Default Re: SSCANF Issue

Download this and try ...
Attached Files
File Type: rar plugins.rar (37.2 KB, 4 views)
__________________



CONTATO: F A C E B O O K: @vinibornpawn

ViniBorn is offline   Reply With Quote
Old 14/05/2012, 05:59 AM   #9
Deduction
Big Clucker
 
Deduction's Avatar
 
Join Date: Feb 2012
Location: Melbourne, Australia
Posts: 162
Reputation: 19
Default Re: SSCANF Issue

Nope, neither of the above help.
Deduction is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help please....SSCANF issue. Dokins Scripting Help 8 25/01/2012 07:07 PM
Issue With sscanf $lim$hady Scripting Help 2 24/01/2012 10:35 AM
Sscanf ID 0 Issue Shockey HD Scripting Help 6 21/12/2011 04:08 AM
Sscanf Issue. Alex_Obando Help Archive 1 15/08/2011 10:50 PM
Issue with sscanf Warlock Help Archive 8 04/08/2010 04:28 PM


All times are GMT. The time now is 01:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.