SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 12/03/2012, 09:33 PM   #1
ServerScripter
Gangsta
 
ServerScripter's Avatar
 
Join Date: Jun 2011
Posts: 682
Reputation: 4
Default Problem using Sscanf2

Hi , the problem is simple : whene i run samp-server , a dialog appears (MSVCR100.dll can not be founded)
betwen i have the lastest V of SSCANF and using Windows XP , so in my Server.cfg:
Code:
plugins sscanf streamer
I HOPE YOU HELP ME
My server logs :*
Code:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3d-R2, (C)2005-2011 SA-MP Team

[03:04:23] 
[03:04:23] Server Plugins
[03:04:23] --------------
[03:04:23]  Loading plugin: sscanf
[03:04:25]   Failed.
[03:04:25]  Loading plugin: streamer
[03:04:25] 

*** Streamer Plugin v2.5.2 by Incognito loaded ***

[03:04:25]   Loaded.
[03:04:25]  Loaded 1 plugins.

[03:04:25] 
[03:04:25] Ban list
[03:04:25] --------
[03:04:25]  Loaded: samp.ban
[03:04:25] 
[03:04:25] 
[03:04:25] Filterscripts
[03:04:25] ---------------
[03:04:25]   Loading filterscript 'caspian.amx'...
[03:04:25]   Loaded 1 filterscripts.

[03:04:25] Script[gamemodes/ren2.amx]: Run time error 19: "File or function is not found"
[03:04:25] Number of vehicle models: 0
[03:04:26] --- Server Shutting Down.
[03:04:26] 

*** Streamer Plugin v2.5.2 by Incognito unloaded ***
__________________
Swat Next Generation TDM : RELEASED !
click here to visit Swat Next Generation GM
ServerScripter is offline   Reply With Quote
Old 12/03/2012, 09:36 PM   #2
Mike_Peterson
Gangsta
 
Mike_Peterson's Avatar
 
Join Date: Apr 2009
Location: In a concrete(used to brick) house
Posts: 861
Reputation: 37
Default Re: Problem using Sscanf2

Hehe, quite funny, I just fixed (30 mins ago) this exact same problem at someone else. he had sscanf2.inc, removed the #include <sscanf2> at teh top, placed a sscanf function on the bottom of his script, fixed.

going to bed now, but heres that code
pawn Code:
stock sscanf(string[], format[], {Float,_}:...)
{
    #if defined isnull
        if (isnull(string))
    #else
        if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
    #endif
        {
            return format[0];
        }
    #pragma tabsize 4
    new
        formatPos = 0,
        stringPos = 0,
        paramPos = 2,
        paramCount = numargs(),
        delim = ' ';
    while (string[stringPos] && string[stringPos] <= ' ')
    {
        stringPos++;
    }
    while (paramPos < paramCount && string[stringPos])
    {
        switch (format[formatPos++])
        {
            case '\0':
            {
                return 0;
            }
            case 'i', 'd':
            {
                new
                    neg = 1,
                    num = 0,
                    ch = string[stringPos];
                if (ch == '-')
                {
                    neg = -1;
                    ch = string[++stringPos];
                }
                do
                {
                    stringPos++;
                    if ('0' <= ch <= '9')
                    {
                        num = (num * 10) + (ch - '0');
                    }
                    else
                    {
                        return -1;
                    }
                }
                while ((ch = string[stringPos]) > ' ' && ch != delim);
                setarg(paramPos, 0, num * neg);
            }
            case 'h', 'x':
            {
                new
                    num = 0,
                    ch = string[stringPos];
                do
                {
                    stringPos++;
                    switch (ch)
                    {
                        case 'x', 'X':
                        {
                            num = 0;
                            continue;
                        }
                        case '0' .. '9':
                        {
                            num = (num << 4) | (ch - '0');
                        }
                        case 'a' .. 'f':
                        {
                            num = (num << 4) | (ch - ('a' - 10));
                        }
                        case 'A' .. 'F':
                        {
                            num = (num << 4) | (ch - ('A' - 10));
                        }
                        default:
                        {
                            return -1;
                        }
                    }
                }
                while ((ch = string[stringPos]) > ' ' && ch != delim);
                setarg(paramPos, 0, num);
            }
            case 'c':
            {
                setarg(paramPos, 0, string[stringPos++]);
            }
            case 'f':
            {
                setarg(paramPos, 0, _:floatstr(string[stringPos]));
            }
            case 'p':
            {
                delim = format[formatPos++];
                continue;
            }
            case '\'':
            {
                new
                    end = formatPos - 1,
                    ch;
                while ((ch = format[++end]) && ch != '\'') {}
                if (!ch)
                {
                    return -1;
                }
                format[end] = '\0';
                if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
                {
                    if (format[end + 1])
                    {
                        return -1;
                    }
                    return 0;
                }
                format[end] = '\'';
                stringPos = ch + (end - formatPos);
                formatPos = end + 1;
            }
            case 'u':
            {
                new
                    end = stringPos - 1,
                    id = 0,
                    bool:num = true,
                    ch;
                while ((ch = string[++end]) && ch != delim)
                {
                    if (num)
                    {
                        if ('0' <= ch <= '9')
                        {
                            id = (id * 10) + (ch - '0');
                        }
                        else
                        {
                            num = false;
                        }
                    }
                }
                if (num && IsPlayerConnected(id))
                {
                    setarg(paramPos, 0, id);
                }
                else
                {
                    #if !defined foreach
                        #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
                        #define __SSCANF_FOREACH__
                    #endif
                    string[end] = '\0';
                    num = false;
                    new
                        name[MAX_PLAYER_NAME];
                    id = end - stringPos;
                    foreach (Player, playerid)
                    {
                        GetPlayerName(playerid, name, sizeof (name));
                        if (!strcmp(name, string[stringPos], true, id))
                        {
                            setarg(paramPos, 0, playerid);
                            num = true;
                            break;
                        }
                    }
                    if (!num)
                    {
                        setarg(paramPos, 0, INVALID_PLAYER_ID);
                    }
                    string[end] = ch;
                    #if defined __SSCANF_FOREACH__
                        #undef foreach
                        #undef __SSCANF_FOREACH__
                    #endif
                }
                stringPos = end;
            }
            case 's', 'z':
            {
                new
                    i = 0,
                    ch;
                if (format[formatPos])
                {
                    while ((ch = string[stringPos++]) && ch != delim)
                    {
                        setarg(paramPos, i++, ch);
                    }
                    if (!i)
                    {
                        return -1;
                    }
                }
                else
                {
                    while ((ch = string[stringPos++]))
                    {
                        setarg(paramPos, i++, ch);
                    }
                }
                stringPos--;
                setarg(paramPos, i, '\0');
            }
            default:
            {
                continue;
            }
        }
        while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
        {
            stringPos++;
        }
        while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
        {
            stringPos++;
        }
        paramPos++;
    }
    do
    {
        if ((delim = format[formatPos++]) > ' ')
        {
            if (delim == '\'')
            {
                while ((delim = format[formatPos++]) && delim != '\'') {}
            }
            else if (delim != 'z')
            {
                return delim;
            }
        }
    }
    while (delim > ' ');
    return 0;
}
__________________
I'm looking for some small-time paid work, no MySQL preferably.
Search before you post!

Got a problem? Debug your script (add prints to it).
If that doesn't help, use Google!
Still having issues? Create a thread on the SA-MP Forums.
If nothing helps, send me a PM.
And I'll try to figure it out with you.
Mike_Peterson is offline   Reply With Quote
Old 12/03/2012, 09:45 PM   #3
ServerScripter
Gangsta
 
ServerScripter's Avatar
 
Join Date: Jun 2011
Posts: 682
Reputation: 4
Default Re: Problem using Sscanf2

thank you for your repply;
i have done all that but still not working
__________________
Swat Next Generation TDM : RELEASED !
click here to visit Swat Next Generation GM
ServerScripter is offline   Reply With Quote
Old 12/03/2012, 10:00 PM   #4
OPremium
Big Clucker
 
OPremium's Avatar
 
Join Date: Oct 2010
Location: Chile
Posts: 156
Reputation: 59
Default Respuesta: Problem using Sscanf2

Quote:
Originally Posted by Y_Less View Post
sscanf 2.5

MSVRC100.dll Not Found

If you get this error, DO NOT just download the dll from a random website (click here for why). This is part of the "Microsoft Visual Studio Redistributable Package". This is required for many programs, but they often come with it. To download it for your system follow one of these links:

http://www.microsoft.com/download/en...s.aspx?id=5555 (For x86)
http://www.microsoft.com/download/en....aspx?id=14632 (For x64)
^ Took me less than 1 minute
OPremium is offline   Reply With Quote
Old 12/03/2012, 10:02 PM   #5
ServerScripter
Gangsta
 
ServerScripter's Avatar
 
Join Date: Jun 2011
Posts: 682
Reputation: 4
Default Re: Problem using Sscanf2

thank u ! i will try
__________________
Swat Next Generation TDM : RELEASED !
click here to visit Swat Next Generation GM
ServerScripter is offline   Reply With Quote
Old 12/03/2012, 10:14 PM   #6
ServerScripter
Gangsta
 
ServerScripter's Avatar
 
Join Date: Jun 2011
Posts: 682
Reputation: 4
Default Re: Problem using Sscanf2

Works fine! thanks
__________________
Swat Next Generation TDM : RELEASED !
click here to visit Swat Next Generation GM
ServerScripter 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
sscanf2 problem. vent Scripting Help 2 12/01/2012 12:09 PM
Problem with Sscanf2 [ISS]Daniele_Tom Help Archive 2 20/04/2011 09:07 AM
sscanf2 problem? Mike Garber Help Archive 4 05/03/2011 03:12 PM
sscanf2 problem Matej_ Help Archive 2 03/02/2011 07:37 AM
sscanf2 problem Marricio Help Archive 7 17/01/2011 09:27 PM


All times are GMT. The time now is 10:10 PM.


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