SetPlayerRaceCheckpoint " Why isnt this wokring? "
#1

Hello be much appreciated if somone could help with this.
Код:
new CircuitCheckpointCount;
new Float:CircuitCheckpointID[3][3] =
{
	{ 3447.9087,-2271.5059,11.7217 }, // Check1 StartLINE!
	{ 3384.7925,-2524.4934,11.7510 },// Check2
	{ 3364.3394,-2460.7122,11.7234 } // Check3
};

SetPlayerRaceCheckpoint(playerid,0,CircuitCheckpointID[CircuitCheckpointCount[0],CircuitCheckpointID[CircuitCheckpointCount][1],CircuitCheckpointID[CircuitCheckpointCount][2],CircuitCheckpointID+1[CircuitCheckpointCount][0],CircuitCheckpointID+1[CircuitCheckpointCount][1],CircuitCheckpointID+1[CircuitCheckpointCount][2],20);


C:\Users\Jordan\Desktop\SA-MP Server\gamemodes\racingnew.pwn(327) : error 029: invalid expression, assumed zero
C:\Users\Jordan\Desktop\SA-MP Server\gamemodes\racingnew.pwn(327) : error 029: invalid expression, assumed zero
C:\Users\Jordan\Desktop\SA-MP Server\gamemodes\racingnew.pwn(327) : warning 215: expression has no effect
C:\Users\Jordan\Desktop\SA-MP Server\gamemodes\racingnew.pwn(327) : error 001: expected token: ";", but found "]"
C:\Users\Jordan\Desktop\SA-MP Server\gamemodes\racingnew.pwn(327) : fatal error 107: too many error messages on one line
Reply
#2

pawn Код:
SetPlayerRaceCheckpoint(playerid,0,CircuitCheckpointID[CircuitCheckpointCount][0],CircuitCheckpointID[CircuitCheckpointCount][1],CircuitCheckpointID[CircuitCheckpointCount][2],CircuitCheckpointID[CircuitCheckpointCount+1][0],CircuitCheckpointID[CircuitCheckpointCount+1][1],CircuitCheckpointID[CircuitCheckpointCount+1][2],20);
Reply
#3

still get errors

C:\Users\Jordan\Desktop\SA-MP Server\gamemodes\racingnew.pwn(349) : error 022: must be lvalue (non-constant)
C:\Users\Jordan\Desktop\SA-MP Server\gamemodes\racingnew.pwn(349) : warning 215: expression has no effect
Reply
#4

That odd, I get no errors when compiling that script (with my edit)
pawn Код:
#include <a_samp>

new CircuitCheckpointCount;
new Float:CircuitCheckpointID[3][3] =
{
    { 3447.9087,-2271.5059,11.7217 }, // Check1 StartLINE!
    { 3384.7925,-2524.4934,11.7510 },// Check2
    { 3364.3394,-2460.7122,11.7234 } // Check3
};

public OnPlayerSpawn( playerid )
{
    SetPlayerRaceCheckpoint(playerid,0,CircuitCheckpointID[CircuitCheckpointCount][0],CircuitCheckpointID[CircuitCheckpointCount][1],CircuitCheckpointID[CircuitCheckpointCount][2],CircuitCheckpointID[CircuitCheckpointCount+1][0],CircuitCheckpointID[CircuitCheckpointCount+1][1],CircuitCheckpointID[CircuitCheckpointCount+1][2],20);
    return 1;
}
Please make sure you copied it correctly. And is it that line, still?
Reply
#5

yeah hmm same line

Код:
dcmd_start(playerid, params[])
{
    #pragma unused params
    SetPlayerRaceCheckpoint(playerid,0,CircuitCheckpointID[CircuitCheckpointCount][0],CircuitCheckpointID[CircuitCheckpointCount][1],CircuitCheckpointID[CircuitCheckpointCount][2],CircuitCheckpointID[CircuitCheckpointCount+1][0],CircuitCheckpointID[CircuitCheckpointCount+1][1],CircuitCheckpointID[CircuitCheckpointCount+1][2],20);
	return 1;
}
Reply
#6

It may be a problem with dcmd, because I just re-made it in ZCMD without errors, as well. Do you have dcmd installed correctly?
Reply
#7

yes ive got it defiend as..

Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Reply
#8

Solved
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)