SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/05/2013, 04:02 PM   #1
Nostrum
Big Clucker
 
Join Date: Apr 2013
Posts: 59
Reputation: -2
Default Is it bad to have sscanf warning: No default value found?

Hello, i was wondering is it really bad to have "sscanf warning: No default value found"
I mean, can i ignore the warning and just carry on with everything else. How will the warning impact performance and so on?
Nostrum is offline   Reply With Quote
Old 10/05/2013, 04:04 PM   #2
Basssiiie
Gangsta
 
Basssiiie's Avatar
 
Join Date: Mar 2011
Location: The Netherlands
Posts: 758
Reputation: 191
Default Re: Is it bad to have sscanf warning: No default value found?

I don't think it's deadly, but is it really that hard to give your optional parameters a default value?
Basssiiie is offline   Reply With Quote
Old 10/05/2013, 04:07 PM   #3
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,517
Reputation: 1635
Default Re: Is it bad to have sscanf warning: No default value found?

It is not really bad but it is annoying. As far as I know it's not that bad but I'm not sure about this!
To fix it:

For example, if you have sscanf(params, "dD", val1, val2)), you don't have the default value! To add a default value:
sscanf(params, "dD(1)", val1, val2)). Now this 'val2' will have default value 1!
__________________
Do not click on this URL -It is secret information
RIP Slayer 1981-2019 \m/
Kwarde is online now   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
[17:50:56] sscanf warning: 'z' is deprecated, consider using 'S' instead. [17:50:56] sscanf warning: No default value fo Zalman Scripting Help 2 25/03/2013 06:33 PM
SSCANF issue (file not found) nmader Scripting Help 6 12/01/2013 03:25 PM
[Help] +1 rep sscanf warning: No default value found. THE_KING$5$ Scripting Help 7 31/07/2012 06:09 AM
sscanf warning. Gh0sT_ Help Archive 5 11/04/2011 01:53 PM
Warning that i cannot fix. [Found out] Lorenc_ Help Archive 8 01/02/2010 04:59 AM


All times are GMT. The time now is 06:34 AM.


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