Jump to content
  • 0

Problema erori complier


FANEX

Question

Buna,Am o problema la un script de gm, o functie de speedboost!Sper sa puteti sa ma ajutati careva...E primul meu topic(sau ma rog 'post')

Iata Problema:

BUG: OnPlayerKeyStateChange' Errorile:

C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : error 029: invalid expression, assumed zero

C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : warning 215: expression has no effect

C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : error 001: expected token: ";", but found ")"

C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : error 029: invalid expression, assumed zero

C:\Documents and Settings\user\Desktop\samp2\gamemodes\FANEQ.pwn(912) : fatal error 107: too many error messages on one line

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

4 Errors.

Scriptu:

new FSPEED[MAX_PLAYERS];

new FJUMP[MAX_PLAYERS];

#define HOLDING(%0) \ ((newkeys & (%0)) == (%0))

#define PRESSED(%0) \

  (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{

new vehicle = GetPlayerVehicleID(playerid);

if(HOLDING(KEY_FIRE & IsPlayerInAnyVehicle(playerid)))

{

AddVehicleComponent(vehicle, 1010);

}

else

{

if(!IsPlayerInInvalidNosVehicle(vehicle,playerid))

SendClientMessage(playerid,0xFF0000AA,"[Nr1]FANEX: Nu poti adauga nitro la vehiculul asta!");

{

if(FSPEED[playerid] == 1)

new Float:x, Float:y, Float:z;

GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);

SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2);

} else { if(FSPEED[playerid] == 0)

}

}

if(newkeys == KEY_SUBMISSION)

{

if (IsPlayerInAnyVehicle(playerid))

{

new Float:health;

new vehicleid = GetPlayerVehicleID(playerid);

GetVehicleHealth(vehicleid, health);

if (health < 1000.0)

{

SetVehicleHealth(vehicleid, 1000.0);

RepairVehicle(GetPlayerVehicleID(playerid));

}

}

}

if (PRESSED(KEY_HANDBRAKE)) // Change KEY_HANDBRAKE to your choice of PlayerKeys

{

if(FJUMP[playerid] == 1)

new Float:x, Float:y, Float:z;

GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);

SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);

} else {if(FJUMP[playerid] == 0)

}

if(newkeys == KEY_SECONDARY_ATTACK) {

new Float:x, Float:y, Float:z;

new vehicleID = GetPlayerVehicleID(playerid);

if(vehicleID == 0) {

GetPlayerPos(playerid, x, y, z);

GetVehicleWithinDistance(x, y, z, 20.0);

if(IsVehicleRcTram(vehicle)) PutPlayerInVehicle(playerid, vehicle, 0);

} else if(GetVehicleModel(vehicleID) != D_TRAM && (IsVehicleRcTram(vehicleID) || GetVehicleModel(vehicleID) == RC_CAM)) {

GetPlayerPos(playerid, x, y, z);

SetPlayerPos(playerid, x+0.5, y, z+1.0);

//SetPlayerSpecialAction(playerid,SPECIAL_ACTION_EXIT_VEHICLE);

}

}

return 1;

}

public OnGameModeExit()

{

}

POZA:(daca e novoie mai postez cateva:P in detaliu :'( )

script1i.jpg

Functia e 100% facuta de mn si cu o zi inainte de a afla ca are errori mergea bine inante sa bag functia de speedboost(cea cu FSPEED[MAX_PLAYERS])

Care e Problema?? L-am contactat si pe RuNix da era ocupat:(Va rog mult un ajutor! multumesc

NOTE: Asta nu e un topic de GF' sper ca nu-l stergeti asa rpd.. lol sau mutatil am pus unu si la sectiunea 'SUPORT' :| cum sterg..lasa

Editat titlul, foloseste titluri in romana.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

la 917 mesaju ala trebuie pus dupa { si faza cu else { if(FPSEEED[playerid]==0) } nu'si are locu,scoate'o

Am facut asa:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{

new vehicle = GetPlayerVehicleID(playerid);

if(HOLDING(KEY_FIRE) && IsPlayerInAnyVehicle(playerid))

{

AddVehicleComponent(vehicle, 1010);

}

else

{

if(!IsPlayerInInvalidNosVehicle(vehicle,playerid))

{

SendClientMessage(playerid,0xFF0000AA,"[Nr1]FANEX: Nu poti adauga nitro la vehiculul asta!");

{

if(FSPEED[playerid] == 1)

new Float:x, Float:y, Float:z;

GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);

SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2);

}

}

return 1;

}

Da e la fel :( am incercat mai multe feluri nu numa ce am postat aici (ca nu postez aiurea inante sa verific toate posibilitatile) si degeaba probabil nu e aici problema e a alt rand am incercat si modelu asta:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{

new vehicle = GetPlayerVehicleID(playerid);

if(HOLDING(KEY_FIRE) && IsPlayerInAnyVehicle(playerid))

{

AddVehicleComponent(vehicle, 1010);

}

else

{

if(!IsPlayerInInvalidNosVehicle(vehicle,playerid))

{

SendClientMessage(playerid,0xFF0000AA,"[Nr1]FANEX: Nu poti adauga nitro la vehiculul asta!");

return 1;

}

if(FSPEED[playerid] == 1)

new Float:x, Float:y, Float:z;

GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);

SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2);

return 1;

}

la fel...  :'(  :'( Sper ca asta nu e spam :-ss Sorry da imi trebuie ajutor

Link to comment
Share on other sites

Am precizat mai sus parca (sau cel putin asa imi amintesc) ca am gresit prima data am pus 'topicu' la sectiunea SUPORT' am zis clar ca am gresit, nu vreau sa fac spam cu topicu meu  :'( da se pare ca [sRC]stuntman avea dreptate cu linia 912 nu akolo e erroare am gresit poza.. e mai recenta dupa ce am facut cateva modificari...deci acum arata asa:

if(HOLDING(KEY_FIRE) && IsPlayerInAnyVehicle(playerid))

{

AddVehicleComponent(vehicle, 1010);

}

else

{

if(!IsPlayerInInvalidNosVehicle(vehicle,playerid)) return SendClientMessage(playerid,0xFF0000AA,"[Nr1]FANEX: Nu poti adauga nitro la vehiculul asta!");

if(FSPEED[playerid] == 1)

{

new Float:x, Float:y, Float:z;

GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);

SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2);

}

}

si face la fel cu errorile! please da careva add la 'fane_eleanor7' sa explic mai multe despre problema daca vrea...(banuiesc ca vor fi reply, genu: cine crezi ca isi pierde timpu cu tn?)

dar pot oferi si eo cate ceva(ex. pot dona 4euro prin sms) sau ajut la creare mape,doar vreau sa ma ajutati sa depistez problema x( x( ca ma enerveaza! youtube.com/Nr1FANEX pt mai multe despre mn

Link to comment
Share on other sites

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.