3D Realms Forums

3D Realms Forums (https://forums.3drealms.com/vb/index.php)
-   Duke Nukem 3D Modifications (https://forums.3drealms.com/vb/forumdisplay.php?f=17)
-   -   Did I do something wrong? Con code is wellmade and is causing errors. (https://forums.3drealms.com/vb/showthread.php?t=37343)

Zaxtor 04-01-2010 05:28 PM

Did I do something wrong? Con code is wellmade and is causing errors.
 
It does it in a newly made GAME.CON but not in the old one.

It keeps saying temp and temp2 is not a game variable.
I'm working on something using a totally different game.con but is doing that.

It messes up other codes but when I disable the code by example:

/*
the new code
*/

The one that mess up works again.here is the error


EDuke32 2.0.0devel 20091017
addsearchpath(): Added C:/DukeNuk/New_Pro/
OS: Windows 7 (6.1.7600)
Loading opengl32.dll
Loading glu32.dll
Initializing DirectDraw...
Using config file 'eduke32.cfg'.
Scanning for GRP files...
Using group file 'DUKE3D.grp.GRP' as main group file.
Compiling: GAME.CON (154141 bytes)
Including: DEFS.CON (36392 bytes)
Including: USER.CON (43647 bytes)
GAME.CON: In state `femcode':
GAME.CON:2572: warning: malformed `else' branch
GAME.CON:2573: warning: found `else' with no `if'.
GAME.CON:2819: warning: found `else' with no `if'.
GAME.CON: In actor `APLAYER':
GAME.CON:3555: warning: found `else' with no `if'.
GAME.CON: In actor `ORGANTIC':
GAME.CON:3965: warning: found `else' with no `if'.
GAME.CON: In state `checklizhit':
GAME.CON:5079: warning: empty `ifwasweapon' branch
GAME.CON: In state `pigshootenemystate':
GAME.CON:5902: warning: found `else' with no `if'.
GAME.CON: In actor `LASERLYNE':
GAME.CON:8596: error: symbol `temp' is not a game variable.
GAME.CON:8596: error: expected a keyword but found `etplayer'.
GAME.CON:8596: error: expected a keyword but found `THISACTOR'.
GAME.CON:8596: error: expected a keyword but found `.cursectnum'.
GAME.CON:8596: error: expected a keyword but found `temp2'.
GAME.CON:8597: error: symbol `temp' is not a game variable.
GAME.CON:8598: error: symbol `temp2' is not a game variable.
Found 7 warning(s), 7 error(s).






Did I forget to put something.?
I haven't edit game con for a while cus I couldn't play duke until I got my new PC few weeks ago.

Here is the code I am making.


useractor notenemy LASERLYNE 0
cstat 2
getactor[THISACTOR].sectnum temp
getplayer[THISACTOR].cursectnum temp2
ifvarvare temp temp2
{
spawn EXPLOSION2
palfrom 11 43 23 63
addphealth -38
killit
}

enda




With or without the "0" near its actor name it doesn't make any difference.

The Commander 04-01-2010 05:47 PM

Re: Did I do something wrong? Con code is wellmade and is causing errors.
 
You have actually defined temp and temp2 as gamevars right?
And that they are being read before your code is?

Also LASERLYNE should be spelt LASERLINE

Zaxtor 04-01-2010 07:12 PM

Re: Did I do something wrong? Con code is wellmade and is causing errors.
 
I know I spelt it on purpose.
Neways we do not see its name ingame.



So I define it just like.

Defining the name of actors.

gamevar (varname) 0 0
etc

---------- Post added at 09:12 PM ---------- Previous post was at 08:43 PM ----------

Fixed thanks for the help :D


All times are GMT -6. The time now is 01:39 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.