|
|
#301 | |
|
Huge Clucker
![]() ![]() ![]() Join Date: Sep 2009
Location: USA
Posts: 237
Reputation: 38
|
Quote:
Was this code fix integrated with the sscanf.zip available for download in the first post of this thread? I did a diff against this and the specifiers.cpp that comes with it and it appears not.. though I've see you've made modifications to the main post.. so.. I'm lost. Which is correct? |
|
|
|
|
|
|
#302 |
|
Banned
![]() Join Date: Apr 2009
Location: England
Posts: 4,013
Reputation: 701
|
Could I use SSCANF to find an IP in some text? I was thinking something like this:
sscanf(string, "d'.'d'.'d'.'d':'d") would that work? and if not could someone give me something that will :P |
|
|
|
|
|
#303 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Sep 2009
Location: USA
Posts: 237
Reputation: 38
|
Yes you can use sscanf to detect IP information in text. No, your example will not work.
|
|
|
|
|
|
#304 |
|
Beta Tester
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2008
Location: 629
Posts: 13,282
Reputation: 1909
|
"p<.>dddd"
That should do it. |
|
|
|
|
|
#305 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Feb 2009
Posts: 1,621
Reputation: 11
|
what does p represent?
|
|
|
|
|
|
#306 |
|
Guest
Posts: n/a
|
delimiter
|
|
|
|
#307 |
|
Beta Tester
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2008
Location: 629
Posts: 13,282
Reputation: 1909
|
I had some clever way in which "p" meant delimiter - "p"adding, or "p"artition or something, but I can't remember what it was.
Anyway, I've confirmed that the code in the first post is not the latest version, however I believe the binaries are. Edit: I've now got my Linux box nicely up and running and I've added sscanf to SVN there. I'm still working on getting a post-commit build running (hopefully cross-compile for Linux/Windows) but I know it does build for Linux. If anyone would like SVN access just say. Also, did other Linux users use a custom build file for this? I had to add "-fPIC" to the compile flags to get it to work, am I missing something or was the build script missing something? Last edited by Y_Less; 11/09/2010 at 07:41 PM. |
|
|
|
|
|
#308 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Sep 2009
Location: USA
Posts: 237
Reputation: 38
|
|
|
|
|
|
|
#309 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2010
Posts: 391
Reputation: 26
|
I'm testing this, but I thought I would ask anyway. I'm trying to have an optional specifier return 'playerid'.
pawn Code:
I have not put the sscanf command in an 'if' statement because it doesn't seem nescessary. I have a simple workaround for this if it is incorrect, but I like the idea of saving a line or two of code. |
|
|
|
|
|
#310 |
|
Big Clucker
![]() ![]() Join Date: Nov 2008
Location: Estonia
Posts: 134
Reputation: 0
|
This should work
pawn Code:
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macros (?) for enums/arrays | MP2 | Scripting Help | 16 | 17/01/2012 07:37 PM |
| Enums - string arrays | SuperViper | Scripting Help | 3 | 31/10/2011 10:00 AM |
| Arrays and enums... | [MWR]Blood | Scripting Help | 9 | 23/09/2011 11:29 AM |
| Enums and Arrays | Th3Angel | Help Archive | 6 | 14/02/2011 11:46 PM |