Color embedding(function)
#4

Quote:
Originally Posted by Jimmy0wns
Посмотреть сообщение
pawn Код:
new string[128];

format(string, sizeof(string), "{%s}I need the text {%s}to be like this.", GetColorFromText(violet), GetColorFromText(red));
SendClientMessage(playerid, -1, string);
Didn't test it, don't even know if this would work but there you go.
Thanks for that. I'll try it
UD:Errors given me below
Код:
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(106) : error 029: invalid expression, assumed zero
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(108) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(108) : error 006: must be assigned to an array
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(109) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(109) : error 006: must be assigned to an array
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(110) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(110) : error 006: must be assigned to an array
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(111) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(111) : error 006: must be assigned to an array
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(112) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(112) : error 006: must be assigned to an array
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(113) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(113) : error 006: must be assigned to an array
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(114) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(114) : error 006: must be assigned to an array
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(115) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(115) : error 006: must be assigned to an array
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(116) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Acer\Desktop\Programming\Languages\PAWN\SAMP Server\gamemodes\blitzkriegOfFaction.pwn(116) : error 006: must be assigned to an array
Quote:
Originally Posted by CalvinC
Посмотреть сообщение
You could just use #define.
pawn Код:
#define red "{FF0000}"
SendClientMessage(playerid, -1, "This is white - "red"This is red");
I will store a color in my string variable and try to call it with "GetColorFromText()" and that is the problem I am facing.
Reply


Messages In This Thread
Color embedding(function) - by Metroplex - 02.04.2015, 12:13
Re: Color embedding(function) - by Jimmy0wns - 02.04.2015, 12:16
Re: Color embedding(function) - by CalvinC - 02.04.2015, 12:16
Re: Color embedding(function) - by Metroplex - 02.04.2015, 12:18
Re: Color embedding(function) - by Evocator - 02.04.2015, 12:39
Re: Color embedding(function) - by Metroplex - 02.04.2015, 12:41
Re: Color embedding(function) - by Evocator - 02.04.2015, 13:50

Forum Jump:


Users browsing this thread: 1 Guest(s)