Jump to content
  • 0

Problema job


Versace

Question

Problema intalnita (descriere): Am adaugat job-ul Distribuitor de Gift si imi da urmatoarele errori
Ero(area / rile) / warning-(ul / urile): 

C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4923) : error 029: invalid expression, assumed zero
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4923) : warning 215: expression has no effect
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4923) : error 001: expected token: ";", but found "]"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4923) : error 029: invalid expression, assumed zero
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4923) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


Liniile de cod / sursa / script-ul(obligatoriu): 

       if(Vehicle[playerid] != -1) SetVehicleToRespawn(Vehicle[playerid]);


Imagini / Video (optional):

public OnPlayerCommandText(playerid, cmdtext[]) {
    if(strcmp("/stopwork", cmdtext, true, 10) == 0)
    {
        if(Working[playerid] == -1) return 1;
        DisablePlayerCheckpoint(playerid);
        Working[playerid] = -1;
        Gifts[playerid] = 0;
        Checkpoint[playerid] = -1;
        TotalGifts[playerid] = 0;
        if(Vehicle[playerid] != -1) SetVehicleToRespawn(Vehicle[playerid]);
        Vehicle[playerid] = -1;
        SendClientMessage(playerid, COLOR_WHITE, "Stop working...");
        if(Timer[playerid] >= 1) { Timer[playerid] = -1; PlayerTextDrawHide(playerid, InfoTD); }
        return 1;
    }
    return 0;
}


Ati incercat sa rezolvati singur?:  Da

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0
Chiar acum, Mister a spus:

si care e linia  


4923

  if(Vehicle[playerid] != -1) SetVehicleToRespawn(Vehicle[playerid]);

Am definit liniile si imi da urmatoarele errori 
4 Errors.
 

C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 029: invalid expression, assumed zero
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : warning 215: expression has no effect
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 001: expected token: ";", but found "]"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 029: invalid expression, assumed zero
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
4341   Working[playerid] = -1;
4342   Gifts[playerid] = 0;
4343   Checkpoint[playerid] = -1;
4344   TotalGifts[playerid] = 0;

 

Link to comment
Share on other sites

  • 0
Acum 1 oră, w1zzan a spus:

  if(Vehicle[playerid] != -1) SetVehicleToRespawn(Vehicle[playerid]);

Am definit liniile si imi da urmatoarele errori 
4 Errors.
 


C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 029: invalid expression, assumed zero
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : warning 215: expression has no effect
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 001: expected token: ";", but found "]"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 029: invalid expression, assumed zero
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

4341   Working[playerid] = -1;
4342   Gifts[playerid] = 0;
4343   Checkpoint[playerid] = -1;
4344   TotalGifts[playerid] = 0;

 

Din cate stiu vehiculul care vrei tu sa il 'respawnezi' trebuie distrus, deci vei folosi asa:(Daca vrei doar sa il respawnezi folosesti functia SetVehicleToRespawn)

 

if(Working[playerid] != -1 && GetPlayerVehicleID(playerid) == Vehicle[playerid]) DestroyVehicle(Vehicle[playerid]); 

 

Edited by DanielE
Link to comment
Share on other sites

  • 0
  • 0
  • 0

Incearcă să folosesti { } după aceea structură if.

Nu sunt 100% sigur că v-a funcționa, dar mai apar și probleme de genul ( am pațit ).

if(Vehicle[playerid] != -1) { SetVehicleToRespawn(Vehicle[playerid]); }
Edited by HtP
Link to comment
Share on other sites

  • 0
Acum 4 minute, HtP a spus:

Incearcă să folosesti { } după aceea structură if.

Nu sunt 100% sigur că v-a funcționa, dar mai apar și probleme de genul ( am pațit ).


if(Vehicle[playerid] != -1) { SetVehicleToRespawn(Vehicle[playerid]); }
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 029: invalid expression, assumed zero
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : warning 215: expression has no effect
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 001: expected token: ";", but found "]"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : error 029: invalid expression, assumed zero
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(4341) : fatal error 107: too many error messages on one line
4341   Working[playerid] = -1;
4342   Gifts[playerid] = 0;
4343   Checkpoint[playerid] = -1;
4344   TotalGifts[playerid] = 0;

Urmatoarele errrori

Link to comment
Share on other sites

  • 0
Acum 4 minute, HtP a spus:

Pune cod-ul unde ai tu declarate cele 4 variabile Working, Gifts, Checkpoint si TotalGifts.

 

 

new
    Timer[MAX_PLAYERS],
    Working[MAX_PLAYERS],
    Gifts[MAX_PLAYERS],
    TotalGifts[MAX_PLAYERS],
    GiftHand[MAX_PLAYERS],
    Vehicle[MAX_PLAYERS],
    Checkpoint[MAX_PLAYERS],
    PlayerText: InfoTD,
    jobVehicles[6],
    jobActor,
    jobPickup;
    
#define Timer
#define Working
#define Gifts
#define TotalGifts
#define GiftHand
#define Vehicle
#define Checkpoint
#define PlayerText: InfoTD
#define jobVehicles[6]
#define jobActor
#define jobPickup

 

Link to comment
Share on other sites

  • 0

Sterge 

#define Timer
#define Working
#define Gifts
#define TotalGifts
#define GiftHand
#define Vehicle
#define Checkpoint
#define PlayerText: InfoTD
#define jobVehicles[6]
#define jobActor
#define jobPickup
  • Upvote 1
Link to comment
Share on other sites

  • 0
Acum 1 minut, HtP a spus:

Sterge 


#define Timer
#define Working
#define Gifts
#define TotalGifts
#define GiftHand
#define Vehicle
#define Checkpoint
#define PlayerText: InfoTD
#define jobVehicles[6]
#define jobActor
#define jobPickup

C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(5164) : error 021: symbol already defined: "GetName"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(5177) : warning 219: local variable "Distance" shadows a variable at a preceding level
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(6437) : error 021: symbol already defined: "OnPlayerDeath"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(8208) : error 021: symbol already defined: "OnPlayerSpawn"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(8647) : error 021: symbol already defined: "OnPlayerEnterVehicle"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(8651) : error 021: symbol already defined: "OnPlayerEnterCheckpoint"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(9046) : error 021: symbol already defined: "OnPlayerPickUpPickup"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(9281) : error 021: symbol already defined: "OnPlayerStateChange"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(9926) : error 021: symbol already defined: "OnPlayerExitVehicle"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(17781) : error 021: symbol already defined: "SetTimer"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(17784) : error 010: invalid function or declaration
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(20088) : error 021: symbol already defined: "JBC_OnDialogResponse"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(30225) : warning 219: local variable "Vehicle" shadows a variable at a preceding level
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(30254) : warning 219: local variable "Vehicle" shadows a variable at a preceding level
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(30281) : warning 219: local variable "Vehicle" shadows a variable at a preceding level
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(30308) : warning 219: local variable "Vehicle" shadows a variable at a preceding level
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(57399) : error 021: symbol already defined: "OnPlayerKeyStateChange"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(61048) : error 021: symbol already defined: "CheckPlayerDistanceToVehicle"
C:\Users\Florin\Desktop\lucrez\lucrez1\gamemodes\lucrez.pwn(61054) : warning 219: local variable "Distance" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


13 Errors.
 

Link to comment
Share on other sites

  • 0
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.