Error: can't use k-codes in long string
#1

Hello people.

In my commands list when i do /cmds it shows me in the textdraw 'Error: can't use k-codes in long string'.

Code:

pawn Код:
if(IsPlayerInAnyVehicle(playerid))
    {
         TH[playerid]="~w~Press ~y~~k~~VEHICLE_HORN~~w~ to hide this box.";
    }
    else
    {
        TH[playerid]="~w~Press ~y~~k~~PED_FIREWEAPON~~w~ to hide this box.";
    }
new str[270], str2[275];
        format(str, sizeof(str), "~n~ ~g~Commands~n~~n~        %s~n~~n~~y~1. ~w~Account~n~~y~2. ~w~Public~n~~y~3. ~w~Messaging~n~~y~4. ~w~Cops ~n~~y~5. ~w~Robbers~n~~y~6. ~w~Medics~n~~y~7. ~w~Houses~n~~y~8. ~w~Businesses~n~~y~9. ~w~Groups~n~~y~10. ~w~Vehicles",TH[playerid]);
        PlayerTextDrawSetString(playerid, CommandsT[playerid], str);
It was working fine before, now when i do /cmds it shows only ''Error: can't use k-codes in long string'." instead of what I wrote in my textdraw.
Reply
#2

pawn Код:
format(str, sizeof(str), "~n~ ~g~Commands~n~~n~        %s~n~~n~~y~1. ~w~Account~n~~y~2. ~w~Public~n~~y~3. ~w~Messaging~n~~y~4. ~w~Cops ~n~~y~5. ~w~Robbers~n~~y~6. ~w~Medics~n~~y~7. ~w~Houses~n~~y~8. ~w~Businesses~n~~y~9. ~w~Groups~n~~y~10. ~w~Vehicles",TH[playerid]);
You can't use long space in a textdraw
Reply
#3

I believe it has to do with the recent updates to the way the ~'s codes are formatted within the script. Maybe it has to do with this warning:

Quote:

If you use color codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.

Reply
#4

Quote:
Originally Posted by CuervO
Посмотреть сообщение
I believe it has to do with the recent updates to the way the ~'s codes are formatted within the script. Maybe it has to do with this warning:
Huh?
I must not use colors after the characters 255?
Reply
#5

Quote:
Originally Posted by CuervO
Посмотреть сообщение
I believe it has to do with the recent updates to the way the ~'s codes are formatted within the script. Maybe it has to do with this warning:
I've just counted all the characters in this textdraw online, and it got only 225 characters, any other help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)