array applyin
#1

Whats wrong with this? i dont remember how to apply an array there very well
its all in pastebin(error,code etc..)
http://pawn.pastebin.com/m42427de6
Reply
#2

pawn Код:
new rand1 = random(sizeof(randomcolors));
    new rand2 = random(sizeof(randomcolors));
    AddStaticVehicle(522,-769.0129,-1568.9924,130.6875,9.0024,randomcolors[rand1],randomcolors[rand2]);
Your array format also looks irregular to me. Quotation marks are used for strings, not values.

Код:
new randomcolors[][] =
{
	{0},
	{1},
	{2},
	{3},
	{4},
	{5},
	{6},
	{7},
	{8},
	{9},
	{10},
	{11},
	{12},
	{13},
	{14},
	{15},
	{16},
	{17},
	{18},
	{19},
	{20},
	{21},
	{22},
	{23},
	{24},
	{25},
	{26},
	{27},
	{28},
	{29},
	{30},
	{126}
};
Reply
#3

yeah thanks
thanks for helpin me (the noob here ) xD
Reply
#4

pawn Код:
new rand1 = random(sizeof(randomcolors));
new rand2 = random(sizeof(randomcolors));
new randomcolors[] =
{
    {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,126};
};
pawn Код:
AddStaticVehicle(522,-769.0129,-1568.9924,130.6875,9.0024,randomcolors[rand1],randomcolors[rand2]); // bugmountain
And While Compiling: Pawn Compiler library has stopped working
windows can check online for a solution the the problem,,
options: Check online for a solution and close program
Close the Program


:OO!
Reply
#5

new rand1 = random(sizeof(randomcolors));
new rand2 = random(sizeof(randomcolors));
new randomcolors[] =
{ - DELETE
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 ,20,21,22,23,24,25,26,27,28,29,30,126};
};
Reply
#6

Quote:
Originally Posted by -8oHd4N-
new rand1 = random(sizeof(randomcolors));
new rand2 = random(sizeof(randomcolors));
new randomcolors[] =
{ - DELETE
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 ,20,21,22,23,24,25,26,27,28,29,30,126};
};
new rand1 = random(sizeof(randomcolors));
new rand2 = random(sizeof(randomcolors));
new randomcolors[] =
{ - DELETE
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 ,20,21,22,23,24,25,26,27,28,29,30,126};
}; - DELETE



Код:
new randomcolors[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 126};
AddStaticVehicle(522,-769.0129,-1568.9924,130.6875,9.0024,randomcolors[random(sizeof(randomcolors))],randomcolors[random(sizeof(randomcolors))]); // bugmountain
Reply
#7

;O
EDIT: Still same error
if anyone wants to teamviewer
first add ma xfire: patchkinson
Reply
#8

You can delete the whole thing

use
pawn Код:
AddStaticVehicle(522,-769.0129,-1568.9924,130.6875,9.0024,-1.-1); // bugmountain
 
instead of

AddStaticVehicle(522,-769.0129,-1568.9924,130.6875,9.0024,randomcolors[rand1],randomcolors[rand2]); // bugmountain
Reply
#9

Quote:
Originally Posted by Cake.
You can delete the whole thing

use
pawn Код:
AddStaticVehicle(522,-769.0129,-1568.9924,130.6875,9.0024,-1.-1); // bugmountain
 
instead of

AddStaticVehicle(522,-769.0129,-1568.9924,130.6875,9.0024,randomcolors[rand1],randomcolors[rand2]); // bugmountain
I think he only wants certain colors, thats why he created an array.
Reply
#10

-_-"
What i want is those colors yes, but i want them to be random
who in hell can help me get PAWN compilin with those Pawn Library errors=!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)