Error: can't use k-codes in long string - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error: can't use k-codes in long string (
/showthread.php?tid=494787)
Error: can't use k-codes in long string -
GoldZoroGrab - 14.02.2014
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.
Re: Error: can't use k-codes in long string -
Sawalha - 14.02.2014
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
Re: Error: can't use k-codes in long string -
CuervO - 14.02.2014
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.
|
Re: Error: can't use k-codes in long string -
GoldZoroGrab - 14.02.2014
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?
Re: Error: can't use k-codes in long string -
GoldZoroGrab - 15.02.2014
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?