13.07.2015, 15:24
I tried to convert my /engine to just press 2 .
This is what i tried :
This is the errors i get:
Lines: 20011
20092: its just a bracket..
This is what i tried :
PHP код:
if ((newkeys==KEY_SUBMISSION))
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: You are not driving a vehicle.");
new string[128];
new vehid = GetPlayerVehicleID(playerid);
if(IsABike(vehid)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: You can't turn on engine on a bike!");
if(Gas[vehid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: This vehicle doesn't have fuel.");
new e,l,a,d,b,bo,o;
GetVehicleParamsEx(vehid,e,l,a,d,b,bo,o);
new name[25];
GetPlayerName(playerid, name, sizeof(name));
if(e == 0)
{
SetVehicleParamsEx(vehid,1,l,a,d,b,bo,o);
format(string, sizeof(string), "* %s porneste motorul vehiculului %s.", name,vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SetVehicleParamsEx(vehid,0,l,a,d,b,bo,o);
format(string, sizeof(string), "* %s opreste motorul vehiculului %s.", name,vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
PHP код:
C:\Users\Paul23\Desktop\new gm\rG3-gamemode-master\gamemodes\rg3.pwn(20011) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Paul23\Desktop\new gm\rG3-gamemode-master\gamemodes\rg3.pwn(20092) : warning 209: function "S@@_OnPlayerKeyStateChange" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
PHP код:
new string[128];