22.01.2012, 06:41
Hola gente, haciendo mi GM me surgio un problema. Como yo tengo islas mapeadas, los players no conosen como llegar exactamente, ya que aveces tienen que hacer trabajos a esas islas y no saben como ir. Lo que quiero yo es marcar cada vez que hagan un trabajo hacia la isla un checkpoint de carrera en la entrada, pero se me hace un problema de como ponerlo. Cada localizacion tiene un ID, entonses lo que quiero hacer es usar case con cada id y en cada ID el cp donde tiene que ir... Pero me tira un error:
Intente de 2 formas:
Primero la variable con las ID de las localizaciones:
una intente asi:
Error: (84) : error 029: invalid expression, assumed zero
La otra asi:
Osea el mismo error; Error: (84) : error 029: invalid expression, assumed zero
No entiendo, alguien me podria ayudar ? Gracias de antemano.
Intente de 2 formas:
Primero la variable con las ID de las localizaciones:
pawn Код:
new ALocations[][TLocation] =
{
// LocationName, LocationX, LocationY, LocationZ
{"Dummy location", 0.0, 0.0, 0.0}, // Location 0 = dummy location (never used)
{"Construccion LS", 1274.0621, -1258.6053, 14.0463}, // Location 1
{"Construccion SF", -2083.0, 209.0, 35.5}, // Location 2
{"Construccion LV", 2708.0, 878.0, 10.0}, // Location 3
{"Construccion Blueberry", 312.25, -233.75, 1.6}, // Location 4
{"Construccion Casino Clown Pocket", 2467.0, 1923.0, 9.8}, // Location 5
{"Solarin Industries", -1822.5, 41.25, 15.25}, // Location 6
{"Terminal Blueberry", 52.75, -278.0, 1.7}, // Location 7
{"KACC Gasolinas Militares", 2708.5, 2641.25, 11.0}, // Location 8
{"Casino Foster Valley", -2501.3259, -676.8932, 139.3203}, // Location 9
{"Angel Pine Maderera", -1965.75, -2436.0, 30.7}, // Location 10
{"Mina Whetstone", -1883.4061, -1670.8868, 21.8023}, // Location 11
{"Mina Hunter Quarry", 370.0, 874.0, 20.5}, // Location 12
{"Easter Bay Madedera", -763.5, -136.0, 65.7}, // Location 13
{"Fabrica Paper LS", 2331.5, -2071.5, 13.6}, // Location 14
{"Fabrica Sprunk", 1334.75, 287.0, 19.6}, // Location 15
{"Centro Medico SF", -2607.0, 684.0, 27.9}, // Location 16
{"Monte Chilliad Madereria", -1995.9152, -1571.2672, 85.9105}, // Location 17
{"Granja Bone Country", 599.5, 1224.75, 11.8}, // Location 18
{"LS Garbage Compound", -1301.0410, 2516.7073, 87.1661}, // Location 19
{"Estado Industrial LV", 1635.75, 750.5, 11.0}, // Location 20
{"Granja Blueberry", -69.5, -35.75, 3.2}, // Location 21
{"Granja de Truth", -1109.9722, -1652.3977, 76.3672}, // Location 22
{"Pecker's Feed & Seed & Co.", -310.5, 2669.5, 62.7}, // Location 23
{"Puerto SF", -1691.0, 31.5, 3.6}, // Location 24
{"Refineria LV", 262.5, 1453.75, 10.6}, // Location 25
{"Refineria LS", 2484.0, -2085.0, 13.6}, // Location 26
{"Fallen Tree Estacion De Serv.", -86.0, -1192.75, 2.0}, // Location 27
{"SF Xoomer Estacion de Serv.", -1659.0, 444.0, 7.2}, // Location 28
{"SF Estacion de Servicio", -2421.5, 953.25, 45.3}, // Location 29
{"LS Estacion de Servicio", 1926.0, -1791.5, 13.5}, // Location 30
{"SF Xoomer Gas Station", -1488.75, 1875.25, 32.7}, // Location 31
{"Whetstone Estacion de Servicio", -1629.0, -2700.0, 48.6}, // Location 32
{"Desert Estacion de Servicio", -1309.5, 2703.75, 50.1}, // Location 33
{"Firth Island Gas Station", 5985.3232, -1557.6968, 9.0037}, // Location 34
{"Aeropuerto Feirth Island", 6324.6060, -1797.3402, 9.0716}, // Location 35
{"San Fierro Internacional", -1152.25, -146.5, 14.2}, // Location 36
{"Seck Island Refineria & Quimicos", 4462.1982, -1567.0573, 9.5186}, // Location 37
{"LS Ocean Docks", 2732.0369, -2512.2952, 13.6641}, // Location 38
{"Bioengineering Corp.", 1347.5, 349.5, 20.0}, // Location 39
{"Laboratorio Palominio Creek", 2262.9443, -85.2355, 26.5090}, // Location 40
{"Fort Carson Deposito", -315.9323, 1193.7043, 19.7554}, // Location 41
{"Bayside Marina", -2430.75, 2310.5, 5.0}, // Location 42
{"LV Carnes y Lacteos", 977.5, 2096.75, 11.0}, // Location 43
{"Catering Foster Valley", -1945.75, -1073.5, 31.0}, // Location 44
{"Donas LS", 1025.75, -1355.0, 13.8}, // Location 45
{"The Rock Rancho", 2366.9370, -649.6507,127.7074}, // Location 46
{"Seck Island Deposito", 4194.4282, -1689.0857, 9.2700}, // Location 47
{"Los Santos Deposito", 2178.5, -2279.75, 13.6}, // Location 48
{"SF Supa Save", -2463.5, 782.0, 35.2}, // Location 49
{"Verona Mall", 1044.75, -1548.75, 13.6}, // Location 50
{"Shopping LV", 2867.25, 2586.0, 10.7}, // Location 51
{"Hospital Fort Carson", -323.4044, 1076.8623, 19.7422}, // Location 52
{"Shopping Seck Island", 4099.6055, -1399.2242, 9.2545}, // Location 53
{"Puerto Feirth Island", 5644.8198, -640.8267, 9.0682}, // Location 54
{"Deposito Bayside", -2285.0, 2281.5, 5.0}, // Location 55
{"Fort carson Deposito de Bebidas", -165.7471, 1023.5652, 19.7422}, // Location 56
{"Estadio Las Venturas", 1377.5, 2245.75, 10.9}, // Location 57
{"P. Creek 24/7", 2318.0, -92.5, 26.5}, // Location 58
{"Deposito Feirth Island", 5800.5566, -815.2907, 8.9796}, // Location 59
{"Puticlub", -2697.0, 1402.5, 7.2}, // Location 60
{"4 Dragons Casino", 1903.75, 960.5, 10.9}, // Location 61
{"SF Centro Financiero", -2039.5, 467.5, 35.2}, // Location 62
{"Area 51", 134.54, 1945.79, 19.00}, // Location 63
{"Busstop", 1067.00, 1357.75, 10.7}, // Location 64
{"Busstop", 1324.75, 1190.75, 10.7}, // Location 65
{"Busstop", 1544.00, 1135.50, 10.7}, // Location 66
{"Busstop", 1603.50, 1130.50, 10.7}, // Location 67
{"Busstop", 1722.50, 1373.25, 10.5}, // Location 68
{"Busstop", 1714.25, 1421.75, 10.5}, // Location 69
{"Busstop", 1010.00, 1411.25, 10.7}, // Location 70
{"Busstop", 1726.50, 1481.75, 10.7}, // Location 71
{"Busstop", 1729.50, 1529.50, 10.7}, // Location 72
{"Busstop", 1705.00, 1965.00, 10.7}, // Location 73
{"Busstop", 1385.00, 1920.00, 10.7}, // Location 74
{"Busstop", 1335.25, 2055.50, 10.7}, // Location 75
{"Busstop", 1073.00, 2055.50, 10.7}, // Location 76
{"Busstop", 1502.25, 2055.50, 10.7}, // Location 77
{"Busstop", 1565.00, 2200.25, 10.7}, // Location 78
{"Busstop", 1636.25, 2175.50, 10.7}, // Location 79
{"Busstop", 1503.50, 2311.00, 10.7}, // Location 80
{"Busstop", 1564.75, 2345.75, 10.7}, // Location 81
{"Busstop", 1725.00, 2247.75, 10.7}, // Location 82
{"Busstop", 1894.50, 2175.50, 10.7}, // Location 83
{"Busstop", 1925.25, 2314.75, 10.7}, // Location 84
{"Busstop", 1925.25, 2115.75, 10.8}, // Location 85
{"Busstop", 2083.50, 2455.50, 10.7}, // Location 86
{"Busstop", 2285.00, 2315.00, 10.7}, // Location 87
{"Busstop", 2305.00, 2515.50, 10.7}, // Location 88
{"Busstop", 2392.00, 2415.50, 10.7}, // Location 89
{"Busstop", 2425.00, 2285.00, 10.7}, // Location 90
{"Busstop", 2449.75, 2235.50, 10.7}, // Location 91
{"Busstop", 2580.25, 2115.50, 10.7}, // Location 92
{"Busstop", 2447.50, 2055.50, 10.7}, // Location 93
{"Busstop", 2115.00, 755.50, 10.7}, // Location 94
{"Busstop", 2019.75, 750.50, 10.7}, // Location 95
{"Busstop", 1975.00, 775.50, 10.7}, // Location 96
{"Busstop", 1885.00, 770.75, 10.7}, // Location 97
{"Busstop", 1894.00, 635.75, 10.7}, // Location 98
{"Busstop", 1974.25, 631.00, 10.7}, // Location 99
{"Busstop", 2020.50, 670.50, 10.7}, // Location 100
{"Busstop", 2114.75, 675.75, 10.7}, // Location 101
{"Busstop", 1084.75, 1196.00, 10.7}, // Location 102
{"Busstop 1 Bayside", -2565.75, 2315.25, 4.83}, // Location 103
{"Busstop 2 Bayside", -2337.00, 2375.00, 5.59}, // Location 104
{"Busstop 1 El Quebrados", -1467.00, 2674.00, 55.68}, // Location 105
{"Busstop 2 El Quebrados", -1528.50, 2548.00, 55.68}, // Location 106
{"Busstop 1 Las Barrancas", -805.64, 1562.30, 26.96}, // Location 107
{"Busstop 2 Las Barrancas", -847.00, 1529.50, 21.66}, // Location 108
{"Busstop Las Payasdas", -269.00, 2625.75, 62.64}, // Location 109
{"Busstop 1 Fort Carson", -45.37, 1200.68, 19.21}, // Location 110
{"Busstop 2 Fort Carson", -100.50, 1195.75, 19.58}, // Location 111
{"Busstop 3 Fort Carson", -249.50, 1016.00, 19.59}, // Location 112
{"Busstop 1 Angel Pine", -2169.75, -2305.75, 30.46}, // Location 113
{"Busstop 2 Angel Pine", -2098.25, -2499.50, 30.46}, // Location 114
{"Busstop 1 Palomino Creek", 2263.75, -30.75, 26.33}, // Location 115
{"Busstop 2 Palomino Creek", 2461.75, 1.00, 26.33}, // Location 116
{"Busstop 1 Montgomery", 1288.50, 329.00, 19.40}, // Location 117
{"Busstop 2 Montgomery", 1286.75, 323.75, 19.40}, // Location 118
{"Busstop 1 Dillimore", 736.00, -527.50, 16.18}, // Location 119
{"Busstop 2 Dillimore", 736.00, -532.50, 16.18}, // Location 120
{"SF Aereo. Puerta 1", -1337.94, -222.79, 14.14}, // ID = 121
{"Aerodromo Pickle Pine (LV)", 1164.9922, 2531.6140, 11.2688}, // ID = 122
{"SF Aereo. Carga 1", -1337.16, -542.29, 14.14}, // ID = 123
{"Aeropuerto Blueberry", -144.9025, 96.0986, 3.4133}, // ID = 124
{"LS Aereo. Puerta 1", 1747.04, -2441.04, 13.55}, // ID = 125
{"Aeropuerto Feirth Island", 6347.3901, -1234.4076, 9.0792}, // ID = 126
{"LS Aereo. Carga 1", 1889.10, -2625.49, 13.54}, // ID = 127
{"LS Aereo. Carga 2", 1754.74, -2622.69, 13.54}, // ID = 128
{"Aerodromo Fort Carson", -33.4673, 1552.6700, 21.2617}, // ID = 129
{"LV Aereo. Puerta 1", 1564.77, 1536.77, 10.82}, // ID = 130
{"Aeropuerto Feirth Island", 6347.2710,-1560.5607, 9.0744}, // ID = 131
{"LV Aereo. Carga 1", 1307.41, 1324.01, 10.82}, // ID = 132
{"LV Aereo. Carga 2", 1308.47, 1361.32, 10.82}, // ID = 133
{"Verdant Meadows Puerta 1", 392.13, 2531.27, 16.54}, // ID = 134
{"Verdant Meadows Puerta de Carga", 291.08, 2525.75, 16.79}, // ID = 135
{"TestRock", 351.5, 1008.75, 28.4}, // ID = 136
{"TestCP", 344.75, 1020.5, 28.3}, // ID = 137
{"Aeropuerto Blueberry", -169.5185, 57.6706, 3.4303},// ID = 138
{"Spinybed Deposito (LV)", 2261.1936, 2769.4785, 10.8203}, //ID = 139
{"Sitio De Construccion The Strip", 2468.9 ,1895.0 ,8.0}, // ID = 140
{"Estacion de Servicio Las Venturas", 2639.9, 1095.5, 10.8}, // ID = 141
{"Estacion De Servicio Come A Lot", 2114.3, 927.0, 10.1}, // ID = 142
{"Estacion De Servicio Fort Carson", 65.1, 1219.6, 18.8}, // ID = 143
{"Burger Shot Garcia (SF)", -2315.7, -153.1, 35.3}, // ID = 144
{"Hospital LS", 1124.9, -1321.1206, 13.7660}, //ID = 145
{"Los Santos Oficina Postal", 973.1, -1260.2, 16.4}, // ID = 146
{"Hotel Rodeo (LS)", 332.1, -1516.1 , 35.8}, // ID = 147
{"Solarin Industries Dillmore", 844.3, -601.0, 18.4}, // ID = 148
{"Blueberry Deposito", -481.8543, 308.6708, 2.4551}, // ID = 149
{"Deposito Montgomery", 1220.9, 188.4, 19.9}, // ID = 150
{"Estacion de Servicio Montgomery", 1405.5, 459.1, 20.2}, // ID = 151
{"Sitio de Construccion Bayside", -2400.9, 2351.1, 4.9}, // ID = 152
{"24/7 Bayside", -2545.8, 2299.1, 4.9}, // ID = 153
{"San Fierro Oficina Postal", -2566.20, 553.9, 14.4}, // ID = 154
{"Angel Pine Deposito", -2096.7, -2245.9, 30.6}, // ID = 155
{"AG-LS1", -2168.4, -2429.9, 30.6}, // Location 156
{"AG-LS2", -2270.6, -2746.9, 40.4}, // Location 157
{"AG-LS3", -1877.0, -2700.5, 54.1}, // Location 158
{"AG-LS4", 17.1795 ,-2650.1619, 40.4843}, // Location 159
{"AG-LS5", -31.7299, -2521.2656, 36.3803}, // Location 160
{"AG-LS5", -286.7164, -2179.6101, 28.687}, // Location 161
{"AG-LS6", 820.7242, -1332.6954, 13.5469}, // Location 162
{"LS-LV1", 1827.9198, -1846.6852, 13.5781}, // Location 163
{"LS-LV2", 2077.5278, -1755.3187, 13.3828}, // Location 164
{"LS-LV3", 2837.5422, -1662.7629, 10.8672}, // Location 165
{"LS-LV4", 2878.3542, 39.4514, 18.4444}, // Location 166
{"LS-LV5", 2460.6196, 778.055, 10.6719}, // Location 167
{"LS-LV6", 2292.8735, 733.2023, 10.8203}, // Location 168
{"LS-LV7", 2832.5530, 1296.4557, 10.7760}, // Location 169
{"Granja Whetstone", -1430.3337, -1520.8960, 101.7489}, // Location 170
{"Aeropuerto de San Fierro", -1149.2333, -171.5765, 14.1484}, // Location 171
{"Ester Bay Quimicos", -1018.3192, -692.0533, 32.0078}, // Location 172
{"Granja Red Country", 1939.3386 ,168.3279 ,37.2813}, // Location 173
{"Bus", -0.4380, 1457.8582 ,21.2517}, // 174
{"bus", -176.0972, 1203.7876, 19.7422}, // 175
{"bus", -200.2603, 987.4543, 19.4470}, // 176
{"bus", -64.1401, 545.6181, 7.8036}, // 177
{"bus", 769.7750, 242.4249, 27.8126}, // 178
{"bus", 1271.7756, 251.3382, 19.5547}, // 179
{"bus", 2283.9133, 28.2822, 26.4844}, // 180
{"Deposito Feirth Island", 5464.5, -1480.3, 8.9}, // 181
{"Arch Angels", -2711.1428 ,198.0334, 4.3281}, // 182
{"Transfender San Fierro", -1936.2089, 233.5417, 34.1563}, // 183
{"Transfender Los Santos", 1040.7440, -1032.9373, 31.9630}, // 184
{"Transfender Las Venturas", 2387.5498, 1030.9122, 10.8203}, // 185
{"Loco Low Co.", 2644.7214, -2020.8910, 13.5469}, // 186
{"Sitio de Construccion Ocean Flats", -2759.9, 229.9, 7.0}, // 187
{"Estacion de Servicio Bayside", -2482.7622, 2237.0791, 4.8438}, // 188
{"Planta Nuclear Island LV", 2319.1814, 3952.5134, 26.2901}, // 189
{"Helipuerto Blueberry", -134.4386, 124.5645, 6.2679}, // 190
{"Helipuerto Mansion Nikk", 1292.7681, -790.8105, 96.4554}, //191
{"Hospital Los Santos", 2030.1637, -1375.9907, 48.3359}, // 192
{"Helipuerto Downtown Los Santos", 1546.2, -1350.7, 329.4}, // 193
{"Helipuerto KACC Gasolinas Militares", 2618.8, 2720.7, 36.5}, //194
{"Yellow Bell Golf Club(LV) ", 1482.3, 2839.2, 10.8}, // 195
{"Casino Caligula", 2175.8298, 1684.4894, 20.3906}, // 196
{"Hospital Las Venturas AP", 1607.2943, 1761.0410, 37.3125}, // 197
{"Bone Country", 674.2734, 1838.5308, 5.1677}, // 198
{"Hospital Fort Carson", -323.4044, 1076.8623, 19.7422}, // 199
{"Hospital San Fierro", -2560.8374, 660.0800, 27.8125}, // 200
{"Casino Foster Valley", -2498.7363, -615.8691, 132.5625}, // 201
{"Angel Pine", -1956.1417, -2432.7869, 32.3516}, // 202
{"Consecionario Los Santos", 1054.7935, -902.4307, 42.0}, // 203
{"Wang Cars San Fierro", -1970.2080, 264.4150, 35.1719}, // 204
{"Otto Cars", -1653.1267, 1223.4124, 7.1797}, // 205
{"Consecionario Las Venturas", 2162.3901, 1402.4966, 10.8203}, // 206
{"Burger Shot Isla Los Santos", 2981.6619, -4001.8979, 10.2454},//207
{"Hotel Isla Los Santos", 3100.4194, -4036.8511, 10.2454},//208
{"Parada Autopistas Islas LS", -691.7931, -3022.7969, 9.8454},//209
{"Estacion de Servicio Sfallow Island", -5051.0435, -2143.3354, 9.4454},//210
{"24/7 Isla Sfallow", -5191.8848, -2056.6545, 9.4454},//211
{"Estacion de Servicio Isla Sunderland", -4538.7061, 967.3904, 9.4172},//212
{"Deposito Sunderland", -4227.1978, 340.5339, 17.2344},//213
{"Deposito Isla Slack", -3561.6094, -983.9965, 34.1172},//214
{"Puerto isla Slack", -3446.3777, -982.5620, 33.6204},//215
{"Estacion de servicio Isla Slack", -3543.3545, -1107.2716, 33.8172},//216
{"Est. de serv. Autopistas Bayside Islands", -5448.8794, 3532.4285, 9.1205},//217
{"Deposito Blackster City Island", -4481.8018, 4274.8740, 8.8344},//218
{"Consesionario Blackster city Island", -4598.2383, 4298.6294, 9.0781},//219
{"Estacion de Servicio Isla Bayside", -3936.5576, 2084.0234, 14.4172},// 220
{"Solarin Bayside Island", -3892.9165, 2030.0238, 14.1172},//221
{"Deposito Isla Whitesnack", -2002.5590, 5736.4160, 15.0834},//222
{"Garage isla Whitesnack", -1946.2249, 5590.0723, 12.7454},//223
{"Refineria Isla Whitesnack", -1903.0645, 5789.1484, 16.6078},//224
{"Mina Montgomery", 1305.4141, 68.2393, 22.0602},//225
{"Aerodromo KACC Gasolinas Militares", 2804.2922, 2771.6777, 10.8203},//226
{"Aerodromo Back o Beyond", -1301.4895, -2185.2031, 26.7362},//227
{"Banco Los Santos", 1388.7333, -1572.7008, 13.5627},//228---------------------------
{"Construccion Los Santos", 1891.4546, -1334.1814, 13.5469},//229
{"Construccion East Los Santos", 2618.2234, -1487.6876, 16.5101},//230
{"LS Stadium", 2729.0134, -1850.4531, 9.5910},//231
{"24/7 Isla LV", 4215.3545, 289.6896, 4.5172},//232
{"Construccion Estacion de Tren P. Creek", 2123.6233, -354.8205, 66.7942},//233
{"Fabrica & Cons. Long Island", 6815.6597, -372.4492, 10.8454},//234
{"Fabrica Sprunk Dack Island", 6790.7715, -158.8270, 10.8454},//235
{"Granja Sierras Whetstone", -1424.1792, -963.8789, 200.8100},//236
{"Granja Dillmore", 1081.1254, -341.2383, 73.9922},//237
{"Granja Flint Country", -1184.1837, -1127.8932, 129.2188},//238
{"Mina Ciudad Fantasma", -1295.4979, 2491.8557, 87.0347},//239
{"Distribuidora Duck Island", 4839.3257, 2223.8242, 10.9454},//240
{"Distribuidora Long Island", 6782.5454, -416.2215, 10.9375},//241
{"Autos Usados Stradlin Island", 3857.6042, 4642.1216, 5.4454},//242
{"Deposito Isla Stradlin", 4112.8438, 4679.6826, 5.4454},//243
{"Gasolinera Duck Island", 4925.7725, 2172.5469, 10.9454}//244
};
una intente asi:
pawn Код:
switch (ALocations[])//linea de error
{
case 8:
{
SetPlayerRaceCheckpoint(playerid, 1, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 10.5);
}
}
La otra asi:
pawn Код:
switch (ALocations[][TLocation])//linea de error
{
case 8:
{
SetPlayerRaceCheckpoint(playerid, 1, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 10.5);
}
}
Osea el mismo error; Error: (84) : error 029: invalid expression, assumed zero
No entiendo, alguien me podria ayudar ? Gracias de antemano.