|
2 registered members (Grant, AndrewAMD),
911
guests, and 9
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: missing bracket, not really?
[Re: Metal_Thrasher]
#140628
07/12/07 02:58
07/12/07 02:58
|
Joined: Oct 2003
Posts: 2,194 Saturn
Metal_Thrasher
OP
Expert
|
OP
Expert
Joined: Oct 2003
Posts: 2,194
Saturn
|
if it helps, after commenting it out. the problem seems to be somewhere is this bit of code Code:
ifelse(gunselec==1 && gun1clip=0 && gun1amm>0) { snd_play(gunpickup, 100, 0); while(1) { animrate1 += 4*time; if (animrate1 > 100) { animrate1 -= 100; gunanimfin=0; return; } ent_animate(screengun,"reload",animrate1,0); wait(1); if(gun1amm > 6) { gun1clip=6; gun1amm-=6; return; } else { gun1clip=gun1amm; gun1amm=0; return; } } }
-Johnny Thrash
|
|
|
Re: missing bracket, not really?
[Re: Metal_Thrasher]
#140629
07/12/07 03:47
07/12/07 03:47
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
try "if" instead of "ifelse" at the beginning.
not sure though.
as u said, ur bracket count seems just fine.
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: missing bracket, not really?
[Re: JibbSmart]
#140630
07/12/07 08:22
07/12/07 08:22
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
i am realy not sure about this but maby you need to add () after return dont be angry if it isnt
"empty"
|
|
|
Re: missing bracket, not really?
[Re: frazzle]
#140632
07/12/07 11:25
07/12/07 11:25
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Quote:
I guess you're getting the error because of the equasion you missed : Code:
ifelse(gunselec==1 && gun1clip==0 && gun1amm>0)...
@frazzle: while you're probably right that he didn't intend to do "gun1clip=0", it is still technically correct. i don't know about c-script, but other languages (probably including lite-c) should be able to use that, but instead of checking if gun1clip equals 0, it would make gun1clip equal 0 and return "true" if it successfully did that (which it will).
i hope u understand either way, you're correct that this is an error and i don't know if it would work with c-script.
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: missing bracket, not really?
[Re: JibbSmart]
#140633
07/12/07 14:45
07/12/07 14:45
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
Well theoritically it is correct but in the practical way, c-script will give a 'missing parameter' error  Cheers Frazzle
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
Re: missing bracket, not really?
[Re: frazzle]
#140634
07/13/07 01:46
07/13/07 01:46
|
Joined: Oct 2003
Posts: 2,194 Saturn
Metal_Thrasher
OP
Expert
|
OP
Expert
Joined: Oct 2003
Posts: 2,194
Saturn
|
THanks for all the help guys. but I figured it out. I tried using if instead of ifelse, and for some reason it all worked out fine.
-Johnny Thrash
|
|
|
Re: missing bracket, not really?
[Re: Metal_Thrasher]
#140635
07/13/07 08:00
07/13/07 08:00
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
Wasn't that what JulzMighty replied  ?? Oh well, glad your problem is solved, but one question is still remaining. Do you get an error when you only use one '=' instead of two in your expression in c-script ?? Cheers Frazzle
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
Re: missing bracket, not really?
[Re: frazzle]
#140636
07/13/07 14:26
07/13/07 14:26
|
Joined: Oct 2003
Posts: 2,194 Saturn
Metal_Thrasher
OP
Expert
|
OP
Expert
Joined: Oct 2003
Posts: 2,194
Saturn
|
Yes I did, I fixed it though, thanks again guys =D
-Johnny Thrash
|
|
|
|