1 Error !?
#1

Hi all. im new in the scripting edition and now im creating my own command /vehrepair.
But i have 1 Error who says:
Quote:

error 008: must be a constant expression; assumed zero. Error 1.

Why i think i make all good but this error...

Here is my command
Quote:

//----------------------------Repair Command----------------------------------------------
if ( !strcmp( cmdtext, "/vehrepair", true ) )
{
if ( !IsPlayerInAnyVehicle( playerid ) )
return SendClientMessage( playerid, -1, "Silly boy, you are not in any vehicle." );

if ( gVehDelay[ playerid ] != -1 )
return SendClientMessage( playerid, -1, "Please wait before using the command again! Or pedobear will ate you." );

if ( GetPlayerMoney( playerid ) < 14500 )
return SendClientMessage( playerid, -1, "Not enough money. Kill a pedobear for money!" );

RepairVehicle( GetPlayerVehicleID( playerid ) );

gVehDelay[ playerid ] = 10;

SetTimerEx( "useRepairAgain", 120000, false, "i", playerid );

return 1;
}

in the NEW CMDS i have this code awready :
Quote:

new gVehDelay[ playerid ] = { -1, ... };

Help please. Whats Wrong
Reply
#2

pawn Код:
gVehDelay[ playerid ] = 1;
pawn Код:
public useRepairAgain(playerid)
{
    gVehDelay[ playerid ] = 0;
}
Reply
#3

Can you just tell me where to put the firts and the second?
Reply
#4

Please Repeat Slowly xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)