SScanf Problem
#1

Hello I got problem with house system.When I type createhouse 1000 It`s shows me only SendClientMessage from sscanf.Here is sscanf line.
pawn Код:
if(sscanf(params, "i", price)) return SendClientMessage(playerid,0xFFBF00FF,"[Usage] {FFFFFF}/createhouse [Price]");
Here is problem.Please help me.
Reply
#2

Try

Код:
if(sscanf(params,"d",price)) return SendClientMessage(playerid, 0xFFBF00FF, "[Usage] {FFFFFF}/createhouse [Price]");
And what do you mean shows only sscanf MSG
Reply
#3

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
Try

Код:
if(sscanf(params,"d",price)) return SendClientMessage(playerid, 0xFFBF00FF, "[Usage] {FFFFFF}/createhouse [Price]");
And what do you mean shows only sscanf MSG
I try it it`s not working.. .Ye it`s only shows SCM (SendClientMessage) house don`t want to create..
Reply
#4

Well. show us your CMD .. lol
Reply
#5

pawn Код:
CMD:createhouse(playerid,params[])
{

    new price,Query[256],houseid = GetHouseFreeSlot();
   
    if(pInfo[playerid][pAdmin] < 5 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,""embed_red"[ERROR] "embed_white"You are not authorized to use this command!");
    if(sscanf(params, "i", price)) return SendClientMessage(playerid,0xFFBF00FF,"[Usage] {FFFFFF}/createhouse [Price]");

    hInfo[houseid][hPrice] = price;
    GetPlayerPos(playerid,hInfo[houseid][hEnterX],hInfo[houseid][hEnterY],hInfo[houseid][hEnterZ]);
    hInfo[houseid][hInterior] = 12;
    hInfo[houseid][hExitX] = 2807.619873;
    hInfo[houseid][hExitY] = -1171.899902;
    hInfo[houseid][hExitZ] = 1025.570312;
    hInfo[houseid][hWorld] = 0;
    hInfo[houseid][hLocked] = 0;
    hInfo[houseid][hOnSale] = 1;

    format(Query, sizeof(Query),"INSERT INTO `samp_houses` SET \
                                `Owner` = 'None',\
                                `EnterX` = '%f', \
                                `EnterY` = '%f', \
                                `EnterZ` = '%f', \
                                `ExitX` = '%f', \
                                `ExitY` = '%f', \
                                `ExitZ` = '%f', \
                                `World` = '%d', \
                                `Locked` = '%d', \
                                `OnSale` = '%d', \
                                `Price` = '%d'"
,
                                hInfo[houseid][hEnterX],
                                hInfo[houseid][hEnterY],
                                hInfo[houseid][hEnterZ],
                                hInfo[houseid][hExitX],
                                hInfo[houseid][hExitY],
                                hInfo[houseid][hExitZ],
                                hInfo[houseid][hWorld],
                                hInfo[houseid][hLocked],
                                hInfo[houseid][hOnSale],
                                hInfo[houseid][hPrice]);
    mysql_query(Query);
    UpdateHouseLabel(houseid);
    return 1;
}
Reply
#6

Can Anyone helps me??
Reply
#7

I get this in console:
Код:
sscanf error: System not initialised!
What that means (sorry for double posting)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)