how to put a randomspawn into another randomspawn?
#1

hey everyone,

im trying to get those 2 randomspawns INTO 1 other randomspawn which works at spawn, the other 2 work when a player does a command:

pawn Код:
new Float:RandomSpawnsDMWorld[][] =
{
    new Rand = random(sizeof(RandomSpawnsDesertDM));
    new rand = random(sizeof(RandomSpawnsGlassDM));
    {RandomSpawnsDesertDM[Rand][1], RandomSpawnsDesertDM[Rand][2], RandomSpawnsDesertDM[Rand][3], RandomSpawnsDesertDM[Rand][4]},
    {RandomSpawnsGlassDM[rand][1], RandomSpawnsGlassDM[rand][2], RandomSpawnsGlassDM[rand][3], RandomSpawnsGlassDM[rand][4]}
};
new Float:RandomSpawnGlassDM[][] =
{
    {26.2488,1570.4476,204.9499,221.3350}, // glass dm spawn 1
    {-27.8678,1547.7212,204.9499,88.4272}, // glass dm spawn 2
    {-28.7127,1491.7623,204.9499,227.1029}, // glass dm spawn 3
    {29.1959,1496.3866,204.9499,269.7678} // glass dm spawn 4
};
new Float:RandomSpawnsDesertDM[][] =
{
    {-1485.0281,-317.1119,265.9619,106.3989},
    {-1497.2167,-379.5136,265.9619,219.5133},
    {-1487.6726,-421.5034,265.9619,53.1317},
    {-1532.4423,-470.1288,265.9619,154.9894},
    {-1578.4342,-480.6183,265.9619,91.3822},
    {-1579.7987,-495.0344,265.9619,97.9857},
    {-1612.8625,-459.0769,270.7901,5.8414},
    {-1653.4803,-390.8176,267.1663,275.6240},
    {-1651.1769,-390.2887,273.4042,254.0271},
    {-1608.7197,-379.6661,273.4042,100.1792},
    {-1619.1598,-341.3009,265.9619,86.4157},
    {-1561.8505,-309.3977,276.6095,174.7999},
    {-1559.2697,-309.3010,271.3027,86.4861},
    {-1573.4069,-301.4973,271.3453,276.0545}
};
but this gives me those errors:
Код:
D:\Program Files\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(31) : error 001: expected token: ";", but found "-identifier-"
D:\Program Files\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(32) : error 001: expected token: ";", but found "-identifier-"
D:\Program Files\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(32) : error 010: invalid function or declaration
D:\Program Files\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(35) : error 010: invalid function or declaration
anyways how can i put a randomspawn into another randomspawn? which will fix these errors

greets niels
Reply
#2

https://sampwiki.blast.hk/wiki/Random
Reply
#3

i didnt asked for that, i asked how to fix these errors, i know how random spawns work, except how to put 1 into another...
Reply
#4

click the link because u will notice your error starts

new Float:RandomSpawnsDesertDM[][] =
new Float:RandomSpawnDesertDM[][4]=

please click CLICK IT IM BEGGING YOU
Reply
#5

Where are the lines?
Reply
#6

iknow, but at other random spawns which DO work, i dont have the [4] neither, just empty

EDIT:

error lines are these:

pawn Код:
new Rand = random(sizeof(RandomSpawnsDesertDM)); new rand = random(sizeof(RandomSpawnsGlassDM));
Reply
#7

quick question where did the 1
Quote:

RandomSpawnsDesertDM[Rand][1]

value come from becuase i didnt see a value here
Quote:

RandomSpawnsDesertDM[][]

Reply
#8

I think, you cannot use this function in your variable.

pawn Код:
new Rand = random(sizeof(RandomSpawnsDesertDM));
new rand = random(sizeof(RandomSpawnsGlassDM));
But try use this.
pawn Код:
new Float:RandomSpawnGlassDM[][4] =
new Float:RandomSpawnsDesertDM[][4] =
And start always from 0, instead of 1. Like here.
pawn Код:
{RandomSpawnsDesertDM[Rand][0], RandomSpawnsDesertDM[Rand][1], RandomSpawnsDesertDM[Rand][2], RandomSpawnsDesertDM[Rand][3]},
{RandomSpawnsGlassDM[rand][0], RandomSpawnsGlassDM[rand][1], RandomSpawnsGlassDM[rand][2], RandomSpawnsGlassDM[rand][3]}
Reply
#9

true, and now you say it i think it should be 0 xD, anyways thats not the lines that give the errors, so that aint the prblem


EDIT: as the post above, also i DID try to put the NEW things out of it, but didnt work, though i didnt start from 0 xD, but could that be the error?
Reply
#10

But change it, because PAWN compiler won't show you Errors there, but you'll get Error in-game. Ex: Wrong Position?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)