It says i have 83 cats!!!
#1

pawn Код:
CMD:cats(playerid, params[])
{
    new str[128];
    format(str, sizeof str, "You have %i cats", CatInfo[playerid][Cats]);
    SendClientMessage(playerid, colorWhite, str);
    return 1;
}
It says i have 83 cats?

pawn Код:
format(query, sizeof(query), "SELECT `cats` FROM `users` WHERE `username` = '%s'", GetName(playerid));
        samp_mysql_query(query);
        samp_mysql_store_result();
        samp_mysql_fetch_row(result);
       
    samp_mysql_get_field(result, CatInfo[playerid][Cats]);
Although if i type:

pawn Код:
CMD:cat(playerid, params[])
{
    CatInfo[playerid][Cats] = 2;
    return 1;
}
And then type /cats it says i have 2!!!

Why is this?



Yes it says bombs, Thats a example image from something else, But the cats say 0 aswell

Reply
#2

1. Stop spamming over all possible forums and topics with your problems.
2. Refer yourself to plugin's documentation to see what different functions actually do.
Reply
#3

You're getting the values from MySQL, but you never update nor save them.
Reply
#4

Quote:
Originally Posted by WackoX
You're getting the values from MySQL, but you never update nor save them.
What?

What i want is to just know why it says 83 and not 0
Reply
#5

Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by WackoX
You're getting the values from MySQL, but you never update nor save them.
What?

What i want is to just know why it says 83 and not 0
Well then, from where do you load the variable 'CatInfo[playerid][Cats]'?
Reply
#6

Quote:
Originally Posted by WackoX
Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by WackoX
You're getting the values from MySQL, but you never update nor save them.
What?

What i want is to just know why it says 83 and not 0
Well then, from where do you load the variable 'CatInfo[playerid][Cats]'?
What do you mean load it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)