Simple error fixing
#1

C:\Users\Calvin\Desktop\Pawno\pawno\PENFS.pwn(11 : error 008: must be a constant expression; assumed zero
C:\Users\Calvin\Desktop\Pawno\pawno\PENFS.pwn(121) : error 010: invalid function or declaration


That erros by;

Код:
new killmessage[][] =
{
	"[KILL] "white"%s "green"Is killed by "white"His Mom "red"Reward: Unlucky marriage!", playername),
	"[KILL] "white"%s "green"Is killed by "white"A Chicken "red"Reward: Egs!", playername),
	"[KILL] "white"%s "green"Is killed by "white"A whore "red"Reward: Happy 'ending'!", playername)
};
How can i fix XD?
Reply
#2

You can't use %(d,s,x,etc.) in arrays and parameters like playername, vehiclename, etc. You must to use formats and randoms:
Код:
switch( random( 3 ) )
{
    case 0: first format
    case 1: second format
    case 2: third format
}
SendClientMessageToAll( color, string_name );
Reply


Forum Jump:


Users browsing this thread: