Errors..?
#1

Hello. So I've been trying to attach a Label Text to the LEO's when they do /assigncar. When the LEO's do /assigncar it creates a labeltext at the back of the car with his callsign and badge number, but I got these errors:
Код:
E:\Shock Roleplay 0.3z\gamemodes\BGRP.pwn(17061) : error 028: invalid subscript (not an array or too many subscripts): "Dispatch3DText"
E:\0.3z Script\gamemodes\BGRP.pwn(17061) : warning 215: expression has no effect
E:\0.3z Script\gamemodes\BGRP.pwn(17061) : error 001: expected token: ";", but found "]"
E:\0.3z Script\gamemodes\BGRP.pwn(17061) : error 029: invalid expression, assumed zero
E:\0.3z Script\gamemodes\BGRP.pwn(17061) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
forward AssignDispatchCar(playerid, carnum, vehicleid);
public AssignDispatchCar(playerid, carnum, vehicleid)
{
    new rank[64], division[64], employer[64], callsign[64], string[64];
    GetPlayerFactionInfo(playerid, rank, division, employer);

    DPCar[carnum][dpCarID] = vehicleid;
    format(DPCar[carnum][dpFaction], 10, "%s", employer);
    format(DPCar[carnum][dpModel], 24, "%s", GetVehicleName(vehicleid));
    DPCar[carnum][dpOfficerID] = playerid;
    format(string, sizeof(string), "%s-%d", callsign, PlayerInfo[playerid][pBadgeNum]);
    Copcar3DText[vehicleid] = Create3DTextLabel(string, 0xC8C8C8C8, 0.0, 0.0, 0.0, 50.0, 0, 1 ); //<< Error Line
}
NOTE:I'd really apperciate it if you guys gave me the (Posx, Posy and Posz) for the label to place it in the back bumper, Like LS-RP

++ REP
Reply
#2

Anyone?
Reply
#3

can u post line 17061
Reply
#4

He already did.
pawn Код:
Copcar3DText[vehicleid] = Create3DTextLabel(string, 0xC8C8C8C8, 0.0, 0.0, 0.0, 50.0, 0, 1 ); //<< Error Line
Reply
#5

show us where did you defined Copcar3DText
Reply
#6

Quote:
Originally Posted by SlimDkhili
Посмотреть сообщение
show us where did you defined Copcar3DText
pawn Код:
new Text3D:Copcar3DText;
Reply
#7

Код:
new Text3D:Copcar3DText[MAX_PLAYERS];
Reply
#8

try this

Код:
new Text3D:Copcar3DText[MAX_PLAYERS];
Reply
#9

Quote:
Originally Posted by SkRiLLeX032
Посмотреть сообщение
try this

Код:
new Text3D:Copcar3DText[MAX_PLAYERS];
The two people above, really need to learn how arrays work.

pawn Код:
new Text3D:Copcar3DText[MAX_VEHICLES];
Try that, MAX_PLAYERS = 1000, MAX_VEHICLES = 2000

In short, you're creating an array with insufficient items.
Reply
#10

Quote:
Originally Posted by Isolated
Посмотреть сообщение
You changed nothing.

pawn Код:
new Text3D:Copcar3DText[MAX_VEHICLES];
Try that, MAX_PLAYERS = 1000, MAX_VEHICLES = 2000

In short, you're creating an array with insufficient items.
i didn't saw his post Sorry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)