Race Script Help
#1

FIXED!
Reply
#2

Bump!
Reply
#3

pawn Код:
if(RacePos[playerid] == 1)
    {
        GivePlayerMoney(playerid,10000);
    }
return 1;
}
Reply
#4

Quote:
Originally Posted by jameskmonger
pawn Код:
if(RacePos[playerid] == 1)
    {
        GivePlayerMoney(playerid,10000);
    }
return 1;
}
No... again the same
Reply
#5

Quote:
Originally Posted by ikarus
Quote:
Originally Posted by jameskmonger
pawn Код:
if(RacePos[playerid] == 1)
    {
        GivePlayerMoney(playerid,10000);
    }
return 1;
}
No... again the same
This is going to sound harsh, but you shouldnt worry about a race script if you cant find/fix that error.

It means, RacePos is declared as a varaible, not an array (which you are using it as).
Reply
#6

Kyosaur!! means :
Код:
new RacePos;
Needs to be :
Код:
new RacePos[MAX_PLAYERS];
Reply
#7

Quote:
Originally Posted by Rac3r
Kyosaur!! means :
Код:
new RacePos;
Needs to be :
Код:
new RacePos[MAX_PLAYERS];
yes but if I put [MAX_PLAYERS] after RacePos, I get this:
Код:
F:\Street Racers And Drifters\filterscripts\Race.pwn(314) : error 022: must be lvalue (non-constant)
F:\Street Racers And Drifters\filterscripts\Race.pwn(314) : warning 215: expression has no effect
F:\Street Racers And Drifters\filterscripts\Race.pwn(439) : error 033: array must be indexed (variable "RacePos")
Line 314:
pawn Код:
RacePos ++;
Line 439:
pawn Код:
RacePos = 0;
Reply
#8

Quote:
Originally Posted by ikarus
Quote:
Originally Posted by Rac3r
Kyosaur!! means :
Код:
new RacePos;
Needs to be :
Код:
new RacePos[MAX_PLAYERS];
yes but if I put [MAX_PLAYERS] after RacePos, I get this:
Код:
F:\Street Racers And Drifters\filterscripts\Race.pwn(314) : error 022: must be lvalue (non-constant)
F:\Street Racers And Drifters\filterscripts\Race.pwn(314) : warning 215: expression has no effect
F:\Street Racers And Drifters\filterscripts\Race.pwn(439) : error 033: array must be indexed (variable "RacePos")
Line 314:
pawn Код:
RacePos ++;
Line 439:
pawn Код:
RacePos = 0;
You are way to inexperienced to be trying to code a race script mate (not trying to be a dick).

314 - RacePos[playerid]++;
439 - RacePos[playerid] = 0;

If playerid isnt available, you're going to have to make a for/loop to go through all the player ids.
Reply
#9

Quote:
Originally Posted by Kyosaur!!
Quote:
Originally Posted by ikarus
Quote:
Originally Posted by Rac3r
Kyosaur!! means :
Код:
new RacePos;
Needs to be :
Код:
new RacePos[MAX_PLAYERS];
yes but if I put [MAX_PLAYERS] after RacePos, I get this:
Код:
F:\Street Racers And Drifters\filterscripts\Race.pwn(314) : error 022: must be lvalue (non-constant)
F:\Street Racers And Drifters\filterscripts\Race.pwn(314) : warning 215: expression has no effect
F:\Street Racers And Drifters\filterscripts\Race.pwn(439) : error 033: array must be indexed (variable "RacePos")
Line 314:
pawn Код:
RacePos ++;
Line 439:
pawn Код:
RacePos = 0;
You are way to inexperienced to be trying to code a race script mate (not trying to be a dick).

314 - RacePos[playerid]++;
439 - RacePos[playerid] = 0;

If playerid isnt available, you're going to have to make a for/loop to go through all the player ids.
Nice, but when I finish a race it says me: Position: 0 and it doesn't give me any money.
Reply
#10

Quote:
Originally Posted by ikarus
Quote:
Originally Posted by Kyosaur!!
Quote:
Originally Posted by ikarus
Quote:
Originally Posted by Rac3r
Kyosaur!! means :
Код:
new RacePos;
Needs to be :
Код:
new RacePos[MAX_PLAYERS];
yes but if I put [MAX_PLAYERS] after RacePos, I get this:
Код:
F:\Street Racers And Drifters\filterscripts\Race.pwn(314) : error 022: must be lvalue (non-constant)
F:\Street Racers And Drifters\filterscripts\Race.pwn(314) : warning 215: expression has no effect
F:\Street Racers And Drifters\filterscripts\Race.pwn(439) : error 033: array must be indexed (variable "RacePos")
Line 314:
pawn Код:
RacePos ++;
Line 439:
pawn Код:
RacePos = 0;
You are way to inexperienced to be trying to code a race script mate (not trying to be a dick).

314 - RacePos[playerid]++;
439 - RacePos[playerid] = 0;

If playerid isnt available, you're going to have to make a for/loop to go through all the player ids.
Nice, but when I finish a race it says me: Position: 0 and it doesn't give me any money.
This is why i said your to inexperienced lol, the questions arent going to stop coming in lol (this is my last answer... i'm down to help, but this script is going to require way to much helping lol... at the end, its going to be like I built it -.-).

If it says zero, your clearing the variable to soon ? i dont have enough code to tell you why its messing up, im just taking a guess.

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)