3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Expression must be of boolean type  (Read 196 times)

« on: May 13, 2014, 07:30:47 AM »
Hi.

I wrote an script but when run it show me this error :
'Right' is not declared
Expression must be of boolean type
Can't implicitly convert from 'bool' to 'int'.
this is my script:

Code: [Select]
bool Right = false;
 
void Main ()
{
if ((iKeyDown(iKeyCode("DIK_RIGHT")) || joyx==1) && Item==4 && Right==false && PressEnter==false)
   {
      RightMove = 1;
      Item = 3;
      Right = true;
      iObjectShow (OBJ_330);
   }
}

can anyone help me?
« Last Edit: May 13, 2014, 08:23:12 AM by behdadsoft »
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #1 on: May 13, 2014, 09:12:33 AM »
I think this is a bug. because already I wrote this script and worked very well but todey when I try run it show me this error.when I remove Right Variable in every line work script but the part of right Key is disable. I Confused, and don't know where is the Problem.

There are this Problem with All Boolean Variables.
« Last Edit: May 13, 2014, 09:40:58 AM by behdadsoft »
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #2 on: May 13, 2014, 09:48:01 AM »
Every time again: 'something is not working! 3D Rad must be bugged.'

I'm going to assume this bit is part of a bigger script and the declarations of 'RightMove', 'Item', 'joyx' and 'FreeEnter' are written elsewhere, but not included.

After declaring the above variables, the script didn't give any errors.

You might need to provide the entire script if you want more help.

Also a little tip, the information given along the error is mostly pretty useful. Try looking up the line and position the error gives you.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #3 on: May 13, 2014, 05:50:18 PM »
 ;D   ;D  hahahahaaaaaaaa  ;D

good one Rob...

--Mike
« Reply #4 on: May 13, 2014, 10:56:00 PM »
Quote
I'm going to assume this bit is part of a bigger script
yes, Right.

My oroginal script is here and defined all Variables:

Code: [Select]
bool Right = false;
bool PressEnter = false;
int Item = 4;
float joyx;


void Main ()
{
if ((iKeyDown(iKeyCode("DIK_RIGHT")) || joyx==1) && Item==4 && Right==false && PressEnter==false)
   {
      RightMove = 1;
      Item = 3;
      Right = true;
      iObjectShow (OBJ_330);
   }
}

No reason why this is happening? already work very well but not now.
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #5 on: May 14, 2014, 03:12:15 AM »
'RightMove' is still not declared and that is still the only problem.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #6 on: May 14, 2014, 03:48:46 AM »
in forum I type this code because I'm in my workplace and not have full code now. also RightMove is declared. but there is Problem.

Code: [Select]
bool Right = false;
bool PressEnter = false;
int Item = 4;
int RightMove = 0;
float joyx;

void Main ()
{
if ((iKeyDown(iKeyCode("DIK_RIGHT")) || joyx==1) && Item==4 && Right==false && PressEnter==false)
   {
      RightMove = 1;
      Item = 3;
      Right = true;
      iObjectShow (OBJ_330);
   }
}
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #7 on: May 14, 2014, 06:33:44 AM »
Rob, you're wasting your time... he's gonna drag you down farther and farther with each post...   
deeper into his world of delusion...

just agree with him...

it hasta be a bug in 3DRAD... ya know, that bug that requires the coder to know what he/she is doing in order for it not to throw an error...

 ;D


--Mike
« Reply #8 on: May 14, 2014, 09:14:45 AM »
Just copied and pasted it to a blank project with a skinmesh and script, it works without error.

Currently using 7.22
« Reply #9 on: May 14, 2014, 11:24:09 AM »
ohhhhh Mike Please do not start again.

Thanks Dart I try it.
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #10 on: May 14, 2014, 12:19:08 PM »
start again  ::)

you brain dead sack o shit...  you outta shut da fuck up before you make yourself look any stupider...


--Mike
« Reply #11 on: May 14, 2014, 07:11:48 PM »
Hmmmm.... try reinstalling 3d rad. Im sure it will get rid of the 3drad bug and will sort all your other problems.
Pages: [1]