SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 12/09/2011, 10:22 AM   #1321
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 17,856
Reputation: 2478
Default Re: sscanf 2.0 - Fixed for 0.3c R5

Can I see your "enum" declaration and the data printed by "query %s" please?
Y_Less is online now   Reply With Quote
Old 12/09/2011, 10:25 AM   #1322
StuffBoy
Big Clucker
 
StuffBoy's Avatar
 
Join Date: Sep 2011
Location: Portugal
Posts: 79
Reputation: 3
Default Re: sscanf 2.0 - Fixed for 0.3c R5

Sure wait a seconds
StuffBoy is offline   Reply With Quote
Old 12/09/2011, 10:28 AM   #1323
StuffBoy
Big Clucker
 
StuffBoy's Avatar
 
Join Date: Sep 2011
Location: Portugal
Posts: 79
Reputation: 3
Default Re: sscanf 2.0 - Fixed for 0.3c R5

pawn Code:
enum pdb
{
    username[MAX_PLAYER_NAME],
    password[50],
    money,
    score,
    key,
    Float:lastx,
    Float:lasty,
    Float:lastz,
    model,
}
new playerdb[MAX_PLAYERS][pdb];

Quote:
// query[11:25:13] query StuffBoy|mypass|15000|1|2|3|4|5|6
Quote:
// print[11:25:13] StuffBoy,mypass,0,0,0,0.000000,0.000000,0.000000,0
StuffBoy is offline   Reply With Quote
Old 12/09/2011, 10:38 AM   #1324
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 17,856
Reputation: 2478
Default Re: sscanf 2.0 - Fixed for 0.3c R5

Have you redefined "MAX_PLAYER_NAME" as 150? If so that's silly, if not why have you set that variable to 150 in sscanf? The definitions must match EXACTLY.

Also, "p" should really come BEFORE "e" in the sscanf definition.
Y_Less is online now   Reply With Quote
Old 12/09/2011, 10:46 AM   #1325
StuffBoy
Big Clucker
 
StuffBoy's Avatar
 
Join Date: Sep 2011
Location: Portugal
Posts: 79
Reputation: 3
Default Re: sscanf 2.0 - Fixed for 0.3c R5

Good point i really did not know the the max length of a player name lol and the delimiter must be before the enumeration or it wont delimit and bug my script. Thanks
StuffBoy is offline   Reply With Quote
Old 12/09/2011, 08:23 PM   #1326
KyleSmith
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,171
Reputation: 242
Default Re: sscanf 2.0 - Fixed for 0.3c R5

Y less, could a new version of sscanf be released as the 'u' parameter does not work in 0.3d. I know its not had a final release yet, but how are we suppost to script if not all of the parameters are working to test the new features.

Thanks
KyleSmith is online now   Reply With Quote
Old 12/09/2011, 09:17 PM   #1327
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 17,856
Reputation: 2478
Default Re: sscanf 2.0 - Fixed for 0.3c R5

The problem with non-final releases is that they change frequently, which makes keeping up to date hard. Why not just script other parts till then?
Y_Less is online now   Reply With Quote
Old 12/09/2011, 09:39 PM   #1328
[03]Garsino
Guest
 
Posts: n/a
Default Re: sscanf 2.0 - Fixed for 0.3c R5

Just use "d" in the meantime.
  Reply With Quote
Old 12/09/2011, 09:47 PM   #1329
KyleSmith
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,171
Reputation: 242
Default Re: sscanf 2.0 - Fixed for 0.3c R5

Quote:
Originally Posted by Y_Less View Post
The problem with non-final releases is that they change frequently, which makes keeping up to date hard. Why not just script other parts till then?
Yes, I agree, but it's hard to check features where you need to get money and cannot use the U parameter or teleporting etc. I've switched to d in the meantime.
KyleSmith is online now   Reply With Quote
Old 12/09/2011, 10:02 PM   #1330
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 17,856
Reputation: 2478
Default Re: sscanf 2.0 - Fixed for 0.3c R5

You update it then! It is, as I keep saying, open source!
Y_Less 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
Macros (?) for enums/arrays MP2 Scripting Help 16 17/01/2012 08:37 PM
Enums - string arrays SuperViper Scripting Help 3 31/10/2011 11:00 AM
Arrays and enums... [MWR]Blood Scripting Help 9 23/09/2011 11:29 AM
Enums and Arrays Th3Angel Help Archive 6 15/02/2011 12:46 AM


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


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