SA-MP Forums Archive
Need some help - random gives errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need some help - random gives errors (/showthread.php?tid=99694)



Need some help - random gives errors - Striker_Moe - 29.09.2009

Код:
new Float: checkpoints[][0] =
{
  { -18.4717,2349.4331,24.1406 },
  { -439.3994,2229.5598,42.3833 },
  { -793.1042,2772.0095,45.6958 },
  { 637.9069,1686.1379,6.9871 },
};
Thats what I have, its meant as random spawns for checkpoints. But I get some errors:

Код:
error 029: invalid expression, assumed zero
error 008: must be a constant expression; assumed zero
Why?


Re: Need some help - random gives errors - eparea51 - 29.09.2009

here you go:
Код:
new Float: checkpoints[][0] =
{
  { -18.4717,2349.4331,24.1406 },
  { -439.3994,2229.5598,42.3833 },
  { -793.1042,2772.0095,45.6958 },
  { 637.9069,1686.1379,6.9871 }
}
I think this will work now. but i am not sure....



Re: Need some help - random gives errors - Desert - 29.09.2009

Код:
new Float: checkpoints[4][3] =
{
  { -18.4717,2349.4331,24.1406 },
  { -439.3994,2229.5598,42.3833 },
  { -793.1042,2772.0095,45.6958 },
  { 637.9069,1686.1379,6.9871 }
};



Re: Need some help - random gives errors - Peter_Corneile - 29.09.2009

All you need to do is remove the comma from the last coord and it will work