Need help :)
:: DarkGDK :: DarkGDK Help
Page 1 of 1 • Share •
Need help :)
hey guys desided to redesign my level so heres the screenshot so u know what im talking about
abit lazy on the switches lol 

okay heres what i need help with
i tryed this but didnt work
heres the code
now it comes up with 3 errors but still runs the program
the errors
Project: newgame, Configuration: Debug Win32 ------
Compiling...
Main.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\newgame\newgame\open.h(13) : warning C4552: '+' : operator has no effect; expected operator with side-effect
c:\documents and settings\administrator\my documents\visual studio 2008\projects\newgame\newgame\open.h(22) : warning C4552: '+' : operator has no effect; expected operator with side-effect
c:\documents and settings\administrator\my documents\visual studio 2008\projects\newgame\newgame\open.h(31) : warning C4552: '+' : operator has no effect; expected operator with side-effect
Linking...
LINK : Debug\newgame.exe not found or not built by the last incremental link; performing full link
so what im trying to do is when the switches turn "active" they add + 5 to switch1 thn same with switch2 when that becomes active
and then it will = to 10 so it will then let u use the switch to open the door
this is probly something pretty basic but just cant figure it out lol
or im just doing somthing slightly wrong
THANKS GUYS



okay heres what i need help with
i tryed this but didnt work

- Code:
void door_open1()
{
int open = 10;
int switch1;
int switch2;
if(dbSpriteCollision(1,6) == 1)
{
switch1 = switch1 + 5;
dbDeleteSprite(6);
dbSprite(9,70,10,7);
}
if(dbSpriteCollision(1,7) == 1)
{
switch2 = switch2 + 5;
dbDeleteSprite(7);
dbShowSprite(20);
}
if(dbSpriteCollision(1,21) == 1)
{
switch1 + switch2;
if(switch1 && switch2 == open)
{
dbMoveSprite(8,2);
}
}
}
now it comes up with 3 errors but still runs the program
the errors
Project: newgame, Configuration: Debug Win32 ------
Compiling...
Main.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\newgame\newgame\open.h(13) : warning C4552: '+' : operator has no effect; expected operator with side-effect
c:\documents and settings\administrator\my documents\visual studio 2008\projects\newgame\newgame\open.h(22) : warning C4552: '+' : operator has no effect; expected operator with side-effect
c:\documents and settings\administrator\my documents\visual studio 2008\projects\newgame\newgame\open.h(31) : warning C4552: '+' : operator has no effect; expected operator with side-effect
Linking...
LINK : Debug\newgame.exe not found or not built by the last incremental link; performing full link
so what im trying to do is when the switches turn "active" they add + 5 to switch1 thn same with switch2 when that becomes active
and then it will = to 10 so it will then let u use the switch to open the door
this is probly something pretty basic but just cant figure it out lol

or im just doing somthing slightly wrong

THANKS GUYS
_________________

Instinct949- Admin
- Posts : 21
Join date : 2010-05-05
Age : 24
Re: Need help :)
when you put
you didn't say what the values actually are so it doesn't know what to add 5 to.
do this:-
hope that helps
- Code:
int switch1;
int switch2;
you didn't say what the values actually are so it doesn't know what to add 5 to.
do this:-
- Code:
int switch1=0;
int switch2=0;
hope that helps

pqowieuryt101- Admin
- Posts : 97
Join date : 2010-04-22
Re: Need help :)
ah that's cool, glad I could help 
this project is really coming along
good job!

this project is really coming along

pqowieuryt101- Admin
- Posts : 97
Join date : 2010-04-22
:: DarkGDK :: DarkGDK Help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|