This Isnt Working :( help me [[SOLVED]] -
Danyal - 21.02.2012
PROBLEM SOLVED SEE LAST PAGE ABOUT THAT FIX
pawn Код:
#include <a_samp>
#include <F_Streamer>
#define FILTERSCRIPT
#define MAX_GATES 2
new basedoor[MAX_GATES],
bool:Open[MAX_GATES char];
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnFilterScriptInit()
{
basedoor[0] = F_CreateObject(980,1242.091,-2573.087,5.638,0.0,0.0,-90.000);
basedoor[1] = F_CreateObject(980,889.423,-2573.138,5.688,0.0,0.0,-90.000);
return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if (PRESSED(KEY_CROUCH))
{
switch(Open{0})
{
case true:
{
F_MoveObject(basedoor[0], 1242.091,-2573.087,-5.25, 1.5);
Open{0} == false; //----- [Line 355] -----
}
case false:
{
F_MoveObject(basedoor[0], 1242.091,-2573.087,5.638, 1.5);
Open{0} == true; //----- [Line 360] -----
}
}
switch(Open{1})
{
case true:
{
F_MoveObject(basedoor[1], 889.423,-2573.138,5.688, 1.5);
Open{1} == false; //----- [Line 369] -----
}
case false:
{
F_MoveObject(basedoor[1], 889.423,-2573.138,5.688, 1.5);
Open{1} == true; //----- [Line 374] -----
}
}
}
return 1;
}
WARNINGS
PHP код:
(374) : warning 215: expression has no effect
(369) : warning 215: expression has no effect
(360) : warning 215: expression has no effect
(355) : warning 215: expression has no effect
Re: This Isnt Working :( help me -
niels44 - 21.02.2012
show us line: 374, 369, 360 and 355
Re: This Isnt Working :( help me -
Danyal - 21.02.2012
see i already mentioned them
EDIT: checkout script carefully
Re: This Isnt Working :( help me -
niels44 - 21.02.2012
eehm nopes... when i put them in a new pawn script there isnt a line above 54 XD pls show us the lines i mentioned(only THAT lines and not a whole piece of code pls)
Re: This Isnt Working :( help me -
emokidx - 21.02.2012
you are using " } " (curly brackets) use " ] "
i guess
Re: This Isnt Working :( help me -
Danyal - 21.02.2012
pawn Код:
Open{0} == false; //----- [Line 355] -----
i have a huge script so its line 355 for me
Re: This Isnt Working :( help me -
niels44 - 21.02.2012
i think you had by accident CAPS ON XD try this
use this:
pawn Код:
#include <a_samp>
#include <F_Streamer>
#define FILTERSCRIPT
#define MAX_GATES 2
new basedoor[MAX_GATES],
bool:Open[MAX_GATES char];
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnFilterScriptInit()
{
basedoor[0] = F_CreateObject(980,1242.091,-2573.087,5.638,0.0,0.0,-90.000);
basedoor[1] = F_CreateObject(980,889.423,-2573.138,5.688,0.0,0.0,-90.000);
return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if (PRESSED(KEY_CROUCH))
{
switch(Open[0])
{
case true:
{
F_MoveObject(basedoor[0], 1242.091,-2573.087,-5.25, 1.5);
Open[0] == false; //----- [Line 355] -----
}
case false:
{
F_MoveObject(basedoor[0], 1242.091,-2573.087,5.638, 1.5);
Open[0] == true; //----- [Line 360] -----
}
}
switch(Open{1})
{
case true:
{
F_MoveObject(basedoor[1], 889.423,-2573.138,5.688, 1.5);
Open[1] == false; //----- [Line 369] -----
}
case false:
{
F_MoveObject(basedoor[1], 889.423,-2573.138,5.688, 1.5);
Open[1] == true; //----- [Line 374] -----
}
}
}
return 1;
}
give me REP+ if it worked
20 rep looks more then 19 XD
Re: This Isnt Working :( help me -
Jochemd - 21.02.2012
Wrong!
Re: This Isnt Working :( help me - suhrab_mujeeb - 21.02.2012
= is used to assign a value. == is used mostly with if statements to check a value.
Re: This Isnt Working :( help me -
Danyal - 21.02.2012
by replacing { to [
Error:
pawn Код:
(369) : error 032: array index out of bounds (variable "Open")