This returns the Chat to clear. What's wrong?
#1

pawn Код:
command(businesses, playerid, params[])
{
    for(new i = 0; i < MAX_BUSINESSES; i++)
    {
        new string[1025];
        format(string, sizeof(string), "%s", Businesses[i][bName]);
        SendClientMessage(playerid, GREY, string);
    }
    return 1;
}
Reply
#2

Because Businesses[i][bName] is assigned to nothing. And you do not make a string with the size 1025. I think the maximum that can be displayed is 128.
Reply
#3

What do you mean, assigned to nothing? & I know, I was meant to put 124.
Reply
#4

Businesses[i][bName] = " "
So all you get is an empty chat.
Reply
#5

You don't need to use format for copying the contents of one variable to another like that.
Just use x=y
Reply
#6

Delete.
Reply
#7

If you have a blank variable and you want to fill it with the contents of another, there is no reason you can't use x=y.
Reply
#8

Apologies to Rob_Maate, I posted without thinking.

Edit: I meant to press edit.. Todays going great so far
Reply
#9

xDDDD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)