error 029: invalid expression
#1

Hy,i have some problems with a FS,when i push "H" - KEY_HORN,i like to open a gate and after i pass over the gate,the gate should close automaticlly.

This is the FS:

Quote:

#include <a_samp>

#define KEY_HORN
new sf6;

public OnFilterScriptInit()
{

CreateObject(987, -2066.288330, 395.351593, 34.171875, 0.0000, 0.0000, 270.0000);
CreateObject(8947, -2050.175293, 404.937683, 37.074646, 0.0000, 0.0000, 90.0000);
CreateObject(987, -2066.311768, 383.436188, 34.171875, 0.0000, 0.0000, 270.0000);
CreateObject(987, -2018.012085, 378.624390, 34.171875, 0.0000, 0.0000, 90.0000);
CreateObject(987, -2018.125977, 408.471039, 34.171875, 0.0000, 0.0000, 90.0000);
CreateObject(987, -2018.116455, 414.407654, 34.171875, 0.0000, 0.0000, 90.0000);
CreateObject(987, -2018.076172, 426.354218, 34.171875, 0.0000, 0.0000, 90.0000);
CreateObject(3475, -2020.940186, 378.807892, 36.548050, 0.0000, 0.0000, 90.0000);
CreateObject(3550, -2020.866577, 379.149231, 35.252586, 0.0000, 0.0000, 90.0000);
CreateObject(3446, -2052.335205, 388.375061, 37.599937, 0.0000, 0.0000, 90.0000);
CreateObject(8613, -2038.551270, 416.487427, 36.868195, 0.0000, 0.0000, 180.0000);
CreateObject(3279, -2026.756104, 386.734955, 34.247490, 0.0000, 0.0000, 180.0001);
CreateObject(3877, -2038.333618, 397.938995, 41.718925, 0.0000, 0.0000, 0.0000);
CreateObject(3877, -2038.357788, 411.891876, 41.768929, 0.0000, 0.0000, 0.0000);
CreateObject(3749, -2018.908325, 400.504944, 40.030289, 0.0000, 0.0000, 90.0000);
CreateObject(3279, -2026.939087, 430.230865, 34.247490, 0.0000, 0.0000, 359.9994);
CreateObject(11495, -2025.913452, 400.741882, 51.019405, 0.0000, 0.0000, 0.0000);
CreateObject(11495, -2025.942139, 416.186920, 50.990719, 0.0000, 0.0000, 0.0000);
CreateObject(641, -2037.455566, 384.614288, 31.999498, 0.0000, 0.0000, 0.0000);
CreateObject(641, -2036.008545, 384.819000, 31.999918, 0.0000, 0.0000, 0.0000);
CreateObject(641, -2034.561035, 384.948181, 31.999498, 0.0000, 0.0000, 0.0000);
CreateObject(641, -2033.523560, 384.920685, 31.999498, 0.0000, 0.0000, 0.0000);
CreateObject(641, -2032.285889, 384.906067, 31.999498, 0.0000, 0.0000, 0.0000);
CreateObject(641, -2031.113770, 384.844574, 31.999498, 0.0000, 0.0000, 0.0000);
CreateObject(1597, -2019.894897, 429.846558, 36.829258, 0.0000, 0.0000, 0.0000);
CreateObject(1597, -2019.868530, 420.138885, 36.829258, 0.0000, 0.0000, 0.0000);
CreateObject(1597, -2019.923462, 415.770447, 36.865719, 0.0000, 0.0000, 0.0000);
CreateObject(1597, -2020.004639, 384.940277, 36.829258, 0.0000, 0.0000, 0.0000);
CreateObject(1364, -2035.706787, 411.211761, 34.955997, 0.0000, 0.0000, 0.0000);
CreateObject(1364, -2032.333252, 412.446259, 34.955997, 0.0000, 0.0000, 90.0000);
CreateObject(1364, -2032.236816, 417.132904, 34.955997, 0.0000, 0.0000, 90.0000);
CreateObject(1597, -2029.273926, 424.440216, 36.829258, 0.0000, 0.0000, 90.0000);
CreateObject(1597, -2033.554443, 430.329681, 36.829258, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2030.592896, 426.346527, 45.845940, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2031.072144, 434.195862, 41.113983, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2022.601685, 391.283234, 38.369377, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2031.163452, 382.753082, 43.502190, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2031.002441, 390.795746, 43.502190, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2023.142212, 390.793365, 45.845940, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2022.927979, 382.892334, 48.056877, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2022.587280, 382.727325, 40.994377, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2031.302612, 382.851074, 50.400627, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2031.282715, 388.231018, 51.496887, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2022.447266, 426.172302, 43.502190, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2031.039185, 425.715820, 38.369377, 0.0000, 0.0000, 0.0000);
CreateObject(3461, -2022.547363, 428.661652, 51.496441, 0.0000, 0.0000, 0.0000);
CreateObject(1472, -2025.955811, 427.642181, 50.740780, 0.0000, 0.0000, 180.0000);
CreateObject(1472, -2025.982910, 389.299103, 50.740780, 0.0000, 0.0000, 0.0000);

sf6 = CreateObject(980, -2019.263794, 400.581604, 36.945267, 0.0000, 0.0000, 270.0000);

return 1;
}


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_HORN)
{
MoveObject(sf6, -2019.310913, 400.609711, 31.419975,3);
SetTimer("GateClose", 9000, false);
return 1;
}
return 1;
}

But i receive that error:

Quote:

C:\Documents and Settings\sfhouse.pwn(66) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

I hope somebody can help me.Thanks
Reply
#2

whic line is 66
Reply
#3


This is the line:

Quote:

if(newkeys & KEY_HORN

The line is showed in pawn compiler
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)