Error Help
#1

(1295) : error 001: expected token: "*then", but found "-identifier-"
(1302) : error 001: expected token: "*then", but found "-identifier-"
(1460) : error 032: array index out of bounds (variable "NSpawns")
(465) : warning 204: symbol is assigned a value that is never used: "NP3"

pawn Код:
#define N_SKIN 115
#define SN_SKIN 107
new Float:NSpawns[][] =
{
    {-809.96, 2429.53, 156.97},
    {-771.69, 2424.31, 157.08},
    {-794.62, 2393.92, 159.50}
};
new NP3;
pawn Код:
Line 1295 : SetPlayerSkin(playerid, N_SKIN);
Line 1302 : SetPlayerSkin(playerid, SN_SKIN);
Line 1460 : SetPlayerFacingAngle(playerid, NSpawns[R andom][3]);
Line 465 : NP3 = CreatePickup(1254,2,-792.58, 2425.74, 157.15, -1);
Help Pls
Reply
#2

Код:
Line 1295 : SetPlayerSkin(playerid, N_SKIN);
Line 1302 : SetPlayerSkin(playerid, SN_SKIN);
Line 1460 : SetPlayerFacingAngle(playerid, NSpawns[random][3]);
Line 465 : NP3 = CreatePickup(1254,2,-792.58, 2425.74, 157.15, -1);
Correct me if i'm whrong.
Reply
#3

pawn Код:
Line 1295 : SetPlayerSkin(playerid, N_SKIN);
Line 1302 : SetPlayerSkin(playerid, SN_SKIN);
Line 1460 :
    new rand = random( sizeof( NSpawns[ ] ) );
    SetPlayerFacingAngle(playerid, NSpawns[rand][3]);
   
Line 465 : NP3 = CreatePickup(1254,2,-792.58, 2425.74, 157.15, -1);
https://sampwiki.blast.hk/wiki/Random

it needs a parameter!
Reply
#4

show the line above line 1295 and 1302 that means show the line 1294 and 1301 and i have no idea about the 3rd error and
About the warning it means that u have assigned a value to NP3 but u have never used NP3 in any thing just ignore that warning
Reply
#5

Line 1294 : if GetPlayerScore(playerid) >= 200
Line 1301 : if GetPlayerScore(playerid) >= 500
Reply
#6

it should be if(GetPlayerScore(playerid) >= 200)
and if(GetPlayerScore(playerid) >= 500)
Reply
#7

You must use () in if statements.
pawn Код:
if (GetPlayerScore(playerid) >= 500)
{
    // code..
}
and

pawn Код:
if (GetPlayerScore(playerid) >= 200)
{
    // code..
}
And a note, that the last valid bound in the array NSpawns is 2.
pawn Код:
SetPlayerFacingAngle(playerid, NSpawns[Random][2]);
Reply
#8

i got this error : (1309) : error 029: invalid expression, assumed zero
Line : {
Reply
#9

Do you think that the code from line 1309 ({) will help us that much? Post few lines before and few lines after the error line..
Reply
#10

There you go
pawn Код:
if(classid == N1)
    {
        if GetPlayerScore(playerid) >= 500
        {
            SetPlayerSkin(playerid, SN_SKIN);
            GameTextForPlayer(playerid,"~b~Superior Necromancer",1000,4);
            SetPlayerColor(playerid, N_COLOR);
            gTeam[playerid] = N1;
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)