03.01.2016, 23:23
So I am trying to spawn vehicle with attached text the following is my code followed by the error I am getting I hope someone can help me I am not to sure what is causing the warning also no vehicles spawn in game because of warning,
Warning:
Код:
new vehicle_id[3]; #define FILTERSCRIPT #include <a_samp> #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Busses By Coolmark1995"); print("--------------------------------------\n"); return 1; } #else //1st vehicle vehicle_id[0] = CreateVehicle(431, 1242.40, -1818.01, 13.51, 5, 0, 120 ); vehicle3Dtext[vehicle_id[0]] = Create3DTextLabel("Bus 45 Los Santos", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 ); Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[0]], vehicle_id[0], 0.0, 0.0, 2.0); //2nd vehicle vehicle_id[1] = CreateVehicle(431, 1242.36, -1825.12, 13.51, 5, 0, 120 ); vehicle3Dtext[vehicle_id[1]] = Create3DTextLabel("Bus 25 San Fierro", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 ); Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[1]], vehicle_id[1], 0.0, 0.0, 2.0); //3rd vehicle vehicle_id[2] = CreateVehicle(431, 1241.71, -1812.58, 13.52, 5, 0, 120 ); vehicle3Dtext[vehicle_id[2]] = Create3DTextLabel("Bus 31 Las Venturas", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 ); Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[2]], vehicle_id[2], 0.0, 0.0, 2.0); public OnFilterScriptExit() { return 1; } #endif
Код:
C:\Users\markh\Downloads\gta san andreas\filterscripts\road1.pwn(39) : warning 203: symbol is never used: "vehicle_id" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.