SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/05/2013, 03: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, 03: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, 03:07 PM   #3
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,713
Reputation: 1671
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!
__________________
When the opportunity presents itself to flip-a da table, uh, you flip-a da table.

Discord: Kwarde#1966
Kwarde 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
[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 05:33 PM
SSCANF issue (file not found) nmader Scripting Help 6 12/01/2013 02:25 PM
[Help] +1 rep sscanf warning: No default value found. THE_KING$5$ Scripting Help 7 31/07/2012 05:09 AM
sscanf warning. Gh0sT_ Help Archive 5 11/04/2011 12:53 PM
Warning that i cannot fix. [Found out] Lorenc_ Help Archive 8 01/02/2010 03:59 AM


All times are GMT. The time now is 09:05 AM.


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