Bank.pwn(7 ![]() Bank.pwn(79) : warning 202: number of arguments does not match definition Bank.pwn(79) : warning 202: number of arguments does not match definition Bank.pwn(79) : warning 202: number of arguments does not match definition Bank.pwn(87) : error 033: array must be indexed (variable "RandomCheckpoints") |
new rand = random(sizeof(RandomCheckpoint));
RandomCheckpoints[playerid] = CreateDynamicRaceCP(playerid, RandomCheckpoint[rand][0], RandomCheckpoint[rand][1], RandomCheckpoint[rand][2],3);
public OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
{
if(checkpointid == RandomCheckpoints)
{
new Float:RandomCheckpoint[5][3] =
{
{760.2212,382.0151,23.1719},
{-771.9505,1435.4984,13.7891},
{3.0273,1345.4529,9.1719},
{207.2326,1860.7728,20.6406},
{418.8860,2530.0115,16.6193}
};
new RandomCheckpoints[MAX_PLAYERS];
new ran = random(sizeof(RandomCheckpoint)); //No Errors, just a warning, meaning you already have the word "rand" already change it, or re-use the old one.
RandomCheckpoints[playerid] = CreateDynamicRaceCP(playerid, RandomCheckpoint[rand][0], RandomCheckpoint[rand][1], RandomCheckpoint[rand][2], 0.0, 0.0, 0.0, 5.0, -1, -1, -1, 50.0);
public OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
{
if(checkpointid == RandomCheckpoints[playerid])//Missing the [playerid]
{
CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_RACE_CP_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1)
local variable "rand" shadows a variable at a preceding level |
PHP код:
Код:
CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_RACE_CP_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1) |
(7 ![]() |
new rand = random(sizeof(RandomCheckpoint));
Re - Read My Post. Sorry.
"//Not an Error, Just a Warning, Meaning You Already Have the Word "Rand" Already. Either Change It, or Re-Use the Old One. " |
new z = random(sizeof(RandomCheckpoint)); //No Errors, just a warning, meaning you already have the word "rand" already change it, or re-use the old one.
RandomCheckpoints[playerid] = CreateDynamicRaceCP(playerid, RandomCheckpoint[z][0], RandomCheckpoint[z][1], RandomCheckpoint[z][2], 0.0, 0.0, 0.0, 5.0, -1, -1, -1, 50.0);
public OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
{
if(checkpointid == RandomCheckpoints[playerid])//Missing the [playerid]
{
(77) : warning 204: symbol is assigned a value that is never used: "ran" |
new ran = random(sizeof(RandomCheckpoint));
What's it saying now?
PHP код:
|
new z = random(sizeof(RandomCheckpoint)); //No Errors, just a warning, meaning you already have the word "rand"