Random text
#5

Actually I want to make a race mission and there is my codes:

Код:
new srrm, rchoosen;
new Float: srx1, Float: sry1, Float: srz1, Float: srx2, Float: sry2, Float: srz2;

new RandomRace[][] =
{
    "Streetrace1",
    "Streetrace2"
};

new Float:Streetrace1[4][3] = {
{2066.7275,852.1683,6.2950},
{2067.2214,977.6674,10.1318},
{2068.9685,1090.7994,10.2382},
{2069.7595,1187.7134,10.2384}
};

new Float:Streetrace2[4][3] = {
{2046.0261,1275.2041,10.2410},
{2046.0046,1184.4506,10.2371},
{2045.7842,1061.9788,10.2382},
{2045.3105,943.6448,9.4538}
};

forward StartStreetrace();
public StartStreetrace()
{
        srrm = random(sizeof(RandomRace));
        rchoosen = RandomRace[srrm]; // line 8425
 	srx1 = rchoosen[0][0]; // line 8426
	sry1 = rchoosen[0][1];
	srz1 = rchoosen[0][2];
	GameTextForAll("~w~Mission ~n~~b~Streetrace", 5000, 1);
	Streetraceactive = 1;
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
                SetPlayerRaceCheckpoint(i, 0, srx1, sry1, srz1, srx2, sry2, srz2, 8.0);
		}
        }
	return 1;
}
And there is the errors:

Код:
construction.pwn(8425) : error 006: must be assigned to an array
construction.pwn(8426) : error 028: invalid subscript (not an array or too many subscripts): "rchoosen"
construction.pwn(8426) : warning 215: expression has no effect
construction.pwn(8426) : error 001: expected token: ";", but found "]"
construction.pwn(8426) : error 029: invalid expression, assumed zero
construction.pwn(8426) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
What to do ?
Reply


Messages In This Thread
Random text - by BGMike - 31.01.2012, 14:35
Re: Random text - by lamarr007 - 31.01.2012, 14:37
Re: Random text - by Konstantinos - 31.01.2012, 14:39
Re: Random text - by doreto - 31.01.2012, 14:39
Re: Random text - by BGMike - 31.01.2012, 15:01
Re: Random text - by Konstantinos - 31.01.2012, 15:09

Forum Jump:


Users browsing this thread: 2 Guest(s)