Sniper rifle tutorial - some error!
Moderator: InsideQC Admins
7 posts
• Page 1 of 1
Sniper rifle tutorial - some error!
http://inside3d.com/showtutorial.php?id=69
Here i read an a tutorial and try to do it.
But when i start compile this code , compiler writes:
Unknow function "else" in this code:
else if (self.impulse == 3)
{
if (self.weapon != IT_SUPER_SHOTGUN)
{
fl = IT_SUPER_SHOTGUN;
if (self.ammo_shells < 2)
am = 1;
}
else
{
fl = IT_SNIPER;
if (self.ammo_shells < 10)
am = 1;
}
}
Can someone help me?
Here i read an a tutorial and try to do it.
But when i start compile this code , compiler writes:
Unknow function "else" in this code:
else if (self.impulse == 3)
{
if (self.weapon != IT_SUPER_SHOTGUN)
{
fl = IT_SUPER_SHOTGUN;
if (self.ammo_shells < 2)
am = 1;
}
else
{
fl = IT_SNIPER;
if (self.ammo_shells < 10)
am = 1;
}
}
Can someone help me?
Last edited by KOLIAN_bel on Sun Mar 25, 2007 6:47 pm, edited 1 time in total.
- KOLIAN_bel
- Posts: 12
- Joined: Sat Mar 24, 2007 8:34 pm
- Location: BELARUS
Can you paste the lines above and below where you copy pasted that?
'else if' blocks have to follow an 'if' block.
For example:
is good.
is bad.
'else if' blocks have to follow an 'if' block.
For example:
- Code: Select all
if
{
...
}
else if
{
...
}
is good.
- Code: Select all
else if
{
...
}
if
{
...
}
is bad.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
I am understand!
There must be another one {
in the end!
Men that writing this don't was very attenitively
There must be another one {
in the end!
Men that writing this don't was very attenitively
- KOLIAN_bel
- Posts: 12
- Joined: Sat Mar 24, 2007 8:34 pm
- Location: BELARUS
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest