View Full Version : Strange error in con code
Hellbound
06-23-2006, 08:26 PM
Hey, people, take a look at this code.
http://www.xthost.info/Hellbound/checksparkhits.con
I am getting an error "found else with no if" in some of the last lines in the 2nd and 3rd state. I don't know the reason. Everything was working perfectly, until I've added whole 3rd state and some lines to the second. Help, please!
DeeperThought
06-23-2006, 08:53 PM
Heh. Gee, it sounds like you may have an 'else' with no 'if' there. But that's just a wild guess :D But seriously, I'll take a look at it. If I can't find anything wrong in a few minutes, though, I will give up and go back to my own problems.
EDIT: OK, well, my text editor is doing a crappy job at splitting the lines up, and it's hard for me to tell where the carriage returns are. You have an 'if' commented out on the very first line, followed by an 'else' on the next line. If there is a carriage return in between them, the compiler will consider that 'else' to be live and that will generate an error. But maybe there is no CR...I dunno. By the way, all those 'ifvare' in a row make my head spin. Why not just use a switch on TEMP1 and do cases instead?
Hellbound
06-23-2006, 09:06 PM
cause I don't understand that yet.
DeeperThought
06-23-2006, 09:59 PM
Look, nothing is ever spawned in those states unless either ifceilingdistl 1 or iffloordistl 4 , right? So instead of putting those conditions in every line, it would be easier to just get them out of the way right at the start:
state checksparkhit1
setvar temp 0
ifceilingdistl 1 setvar temp 1
iffloordistl 4 setvar temp 1
ifvare temp 1
{
switch TEMP1
case 181: spawn CONCRETE_HOLEV killit break
case 184: spawn CONCRETE_HOLEV killit break
// and so on...
endswitch
}
ends
Dr. Kill
06-29-2006, 09:02 AM
And to think, the great Hellbound is coding as poorly as me? Remember the gorepack cons when I did most of the work? They were a ****ing mess! :D
Hellbound
06-29-2006, 06:34 PM
Yea, how could I forget ? :D
And Hellbound is not "great". He is normal as all.
Hey, did ya check that WMV from my signature ? :D
The Commander
06-29-2006, 10:33 PM
Hey, did ya check that WMV from my signature ? :D
Is there spose to be sound in that video?
DeeperThought
06-29-2006, 11:20 PM
Heh. There certainly is sound. Apparently he's into Polish Death Metal or some such.
gorath
06-30-2006, 01:14 AM
About the video where Hellbound growls. Any change of getting the full song when it's ready? Didn't quite undestand why you destroyed that beer bottle at the end, or was it even a beer bottle?
Hellbound
06-30-2006, 03:54 AM
Hehehe, about this bottle, I shout there in polish:
"And now I'll bring destruction! FOR SATAN!" :D
And about that songs, we're about to finish our demo and when it's done, I'll give you a sign. We are "Putridity".
Dr. Kill
06-30-2006, 01:03 PM
That video ****in rocks! I gotta show my friend, Tom. He loves Death Metal, and destruction! :D :insomnia:
vBulletin® v3.8.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.