SSCANF problem
#1

Hello guys, when i was testing a command Supported by sscanf it gives me Unknown Command then i Checked Server.log i saw this sscanf error: System not initialised.
What's problem and how do i can fix it?

Код:
Sorry For multi-asks
Reply
#2

Bump Help
Reply
#3

Show the command at least.
Reply
#4

here it is:
PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define grey 0x000FFFFF
#define lightred 0x00FFF0F


CMD:skin(playerid,params[])
{
        new 
skin;
        if(
sscanf(params,"i",skin)) return SendClientMessage(playerid,grey,"Usage: /myskins (skinid)");
        if(!
IsValidSkin(skin)) return SendClientMessage(playerid,lightred,"[System]: Invalid skinID");
        
SetPlayerSkin(playerid,skin);
        return 
1;
}

stock IsValidSkin(SkinID)
{
    if((
SkinID >= && SkinID <= 2)||(SkinID == 7)||(SkinID >= && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)||(SkinID >= 290 && SkinID <= 299)) return true;
    else return 
false;

Reply
#5

BUMP
Reply
#6

Quote:
Originally Posted by RyderX
Посмотреть сообщение
here it is:
PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define grey 0x000FFFFF
#define lightred 0x00FFF0F
CMD:skin(playerid,params[])
{
        new 
skin;
        if(
sscanf(params,"i",skin)) return SendClientMessage(playerid,grey,"Usage: /myskins (skinid)");
        if(!
IsValidSkin(skin)) return SendClientMessage(playerid,lightred,"[System]: Invalid skinID");
        
SetPlayerSkin(playerid,skin);
        return 
1;
}
stock IsValidSkin(SkinID)
{
    if((
SkinID >= && SkinID <= 2)||(SkinID == 7)||(SkinID >= && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)||(SkinID >= 290 && SkinID <= 299)) return true;
    else return 
false;

Don't bump your post until 24h..
This is your whole code ?
EDIT: Try this
pawn Код:
#include <sscanf>
Reply
#7

Thanks for your help
Reply
#8

Dont tell me you did not had sscanf before & including it into script fixed the problem..............
Reply
#9

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Dont tell me you did not had sscanf before & including it into script fixed the problem..............
Nah bro, xd r you kidding me? i did already had sscanf Plugin and allthing but i don't why it wasn't working fine, but now after including this
PHP код:
#include <sscanf> 
it's done.
Reply
#10

Quote:
Originally Posted by RyderX
Посмотреть сообщение
Nah bro, xd r you kidding me? i did already had sscanf Plugin and allthing but i don't why it wasn't working fine, but now after including this
PHP код:
#include <sscanf> 
it's done.
When you have a plugin or a include placed in there perspective folders it won't be used unless you load it or place it in your GM or .cfg.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)