Problem with a long string.
#1

pawn Код:
format(str2,sizeof(str2),"{007265}Faction Edit - {b7ba00}%s",inputtext);
            format(str3,sizeof(str3),"{007265}FACTION INFORMATION", "
            {007265} Please review the faction's information so far before continuing:\n
            {b7ba00} FACTION NAME: {ffffff}%s\n
            {b7ba00}FACTION TYPE: {ffffff}%s\n
            {b7ba00}FACTION DEFAULT SKIN: {ffffff}%i\n
            {b7ba00}FACTION RANKS:\n
            {b7ba00}1. %s\n
            {b7ba00}2. %s\n
            {b7ba00}3. %s\n
            {b7ba00}4. %s\n
            {b7ba00}5. %s\n
            {b7ba00}6. %s\n
            {b7ba00}7. %s\n
            {b7ba00}8. %s\n
            {b7ba00}9. %s\n
            {b7ba00}10. %s\n
            {b7ba00}11. %s\n
            {b7ba00}12. %s\n
            {b7ba00}13. %s\n
            {b7ba00}14. %s\n
            {b7ba00}15. %s\n"
, "Continue Editing", "Cancel", inputtext,fInfo[f_mysql_entry][fType],fInfo[f_mysql_entry][fType],fInfo[f_mysql_entry][fDefaultSkin],
            FactionRank[f_mysql_entry][0],FactionRank[f_mysql_entry][1],FactionRank[f_mysql_entry][2],FactionRank[f_mysql_entry][3],FactionRank[f_mysql_entry][4],FactionRank[f_mysql_entry][5],FactionRank[f_mysql_entry][6],
            FactionRank[f_mysql_entry][7],FactionRank[f_mysql_entry][8],FactionRank[f_mysql_entry][9],FactionRank[f_mysql_entry][10],FactionRank[f_mysql_entry][11],FactionRank[f_mysql_entry][12],FactionRank[f_mysql_entry][13],FactionRank[f_mysql_entry][14]);
The errors I get are something to do with the coloring, not sure:

pawn Код:
rp.pwn(1786) : error 037: invalid string (possibly non-terminated string)
rp.pwn(1787) : warning 215: expression has no effect
rp.pwn(1787) : error 001: expected token: ";", but found "}"
rp.pwn(1787) : warning 217: loose indentation
rp.pwn(1787) : error 017: undefined symbol "Please"
rp.pwn(1787) : error 017: undefined symbol "review"
rp.pwn(1787) : fatal error 107: too many error messages on one line
Reply
#2

add blackslash ( \ ) everytime you want to use a new line in pawn
format(str3,sizeof(str3),"{007265}FACTION INFORMATION", "\
{007265} Please review the faction's information so far before continuing:\n\
...
Reply
#3

pawn Код:
format(str3,sizeof(str3),"{007265}FACTION INFORMATION","{007265}Please review the faction's information so far before continuing: \n\
            {b7ba00} FACTION NAME: {ffffff}%s  \n\
            {b7ba00}FACTION TYPE: {ffffff}%s  \n\
            {b7ba00}FACTION DEFAULT SKIN: {ffffff}%i  \n\
            {b7ba00}FACTION RANKS:  \n\
            {b7ba00}1. %s \n\
            {b7ba00}2. %s \n\
            {b7ba00}3. %s \n\
            {b7ba00}4. %s \n\
            {b7ba00}5. %s \n\
            {b7ba00}6. %s \n\
            {b7ba00}7. %s \n\
            {b7ba00}8. %s \n\
            {b7ba00}9. %s \n\
            {b7ba00}10. %s \n\
            {b7ba00}11. %s \n\
            {b7ba00}12. %s \n\
            {b7ba00}13. %s \n\
            {b7ba00}14. %s \n\
            {b7ba00}15. %s \n\", "
Continue Editing", "Cancel", inputtext,fInfo[f_mysql_entry][fType],fInfo[f_mysql_entry][fType],fInfo[f_mysql_entry][fDefaultSkin],
            FactionRank[f_mysql_entry][0],FactionRank[f_mysql_entry][1],FactionRank[f_mysql_entry][2],FactionRank[f_mysql_entry][3],FactionRank[f_mysql_entry][4],FactionRank[f_mysql_entry][5],FactionRank[f_mysql_entry][6],
            FactionRank[f_mysql_entry][7],FactionRank[f_mysql_entry][8],FactionRank[f_mysql_entry][9],FactionRank[f_mysql_entry][10],FactionRank[f_mysql_entry][11],FactionRank[f_mysql_entry][12],FactionRank[f_mysql_entry][13],FactionRank[f_mysql_entry][14]);
Still displays errors:
pawn Код:
rp.pwn(1802) : error 075: input line too long (after substitutions)
rp.pwn(1803) : error 037: invalid string (possibly non-terminated string)
rp.pwn(1803) : warning 215: expression has no effect
rp.pwn(1803) : error 001: expected token: ";", but found "}"
rp.pwn(1803) : warning 217: loose indentation
rp.pwn(1803) : error 017: undefined symbol "Please"
rp.pwn(1803) : fatal error 107: too many error messages on one line
Reply
#4

use strcat or remove unnecessary code like color ({b7ba00})
Reply
#5

But I want it colorized.
Reply
#6

then use strcat
Reply
#7

How..? can you give me an example in my code?
Reply
#8

Remove the colour from the
pawn Код:
{b7ba00}1. %s \n\
{b7ba00}2. %s \n\
{b7ba00}3. %s \n\
{b7ba00}4. %s \n\
{b7ba00}5. %s \n\
{b7ba00}6. %s \n\
{b7ba00}7. %s \n\
{b7ba00}8. %s \n\
{b7ba00}9. %s \n\
{b7ba00}10. %s \n\
{b7ba00}11. %s \n\
{b7ba00}12. %s \n\
{b7ba00}13. %s \n\
{b7ba00}14. %s \n\
{b7ba00}15. %s \n
Text colour will change again after FACTION RANKS: and it will remain the same untill the end. So basicly you colour with the same colour again and again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)