I had been running through the Tutorial for the FPS, well the only set are connected to this, I found these errors in it so far, and was going to test my fixes which are as follows:
Firstly here's a line you won't get past.
if wrapvalue(camera angle x(0))>40 and wrapvalue(camera angle x(0))180 then xrotate camera 0,40
and here's the error message I get when I do run the exe or build it if I leave it as it is.
#100007: variable Name is not valid at line 51 (the line you see above).
Now the problem is a missing "<" sign infront of the CAMERA ANGLE X(0)"<"180 and the line should, if I am correct, read as follows.
if wrapvalue(camera angle x(0))>40 and wrapvalue(camera angle x(0))<180 then xrotate camera 0,40
ok thats the first problem dealt with, heres the next, and infact the next line is the same, add the "<" (without the quote marks
) infront of the CAMERA ANGLE X(0)"<"280
And this line should now read:
if wrapvalue(camera angle x(0))>180 and wrapvalue(camera angle x(0))<280 then xrotate camera 0,280
OK now thats sorted we have more mistakes...
This line from Tut8A (the logic tuts)
if abs(viewa#-obja#)10.0 and abs(dy#)5.0 and dist#30.0
is also missing signs before the 10.0 and the 5.0 and after the dist#
I am guessing here at a <10.0, <5.0 and Dist#<=30.0
as it's a little trial and error sorting this out.
Now if that wasn't enough for you, try the next line too:
This Line in Tut8B (Again in logic, go figure...)
if dist#2.0
Should read
if dist#<2.0
Note the extra "<" infront of 2.0
OK thats it, now the bugs have been found and eliminated, OR at least so I thought...
Now I go to test my findings before letting you all know why the darn thing won't work incase anyone else was having problems with the code, so I build an exe that worked fine, then run the exe and all seems fine until a sudden stop and a message saying it can't load the BSP file for the world;
So I take a gander at the index and find Load BSP help to see if it is something I have missed, here it says as follows:
LOAD BSP
This command will load a BSP world into the 3D scene. The BSP
world automatically draws to the current camera and cannot be
rotated or repositioned. Culling, texturing and collision are all
handled automatically and through the related world commands. The
first parameter allows you to specify a packed file containing the
BSP world files, normally a PAK or PK3 file. If the BSP world is not
being loaded from a packed file, this parameter should be an empty
string. The second parameter is the BSP filename of the world you
wish to load. This file can either be contained within the specified
packed file, or exist as a standalone BSP file. If loading the BSP file
as a standalone file, ensure the current directory contains any files
used by the BSP world.
SYNTAX
LOAD BSP PK3 Filename, BSP Filename
Right, so I see a need to check the file is there in the file the code points to, when I do I find it where it should be except there is a difference, the code says this:
rem TUT4A
rem Load BSP world and sky model
load bsp "world\ikzdm1.pk3","ikzdm1.bsp"
But there is no sighting of any kind of "ikzdm1.pk3" in the folder but a "ikzdm1.bsp"is present, Hmm I think I need to leave an empty string in the quotes previos to ,"ikzdm1.bsp", and I tried this:
load bsp "","ikzdm1.bsp"
With no Joy, so I am thinking hmm an empty string.. so I tried this instead:
load bsp "world$","ikzdm1.bsp"
Being world$ is empty as I have added nothing to that string variable I hoped it may work. Well no it didn't as it is a variable I suppose and not an empty string, so what is an empty string??? I must be missing something here. Is it just "" = empty string, if so it isn't working, and besides even if it did, there is evidence already it may not work because the help file states..
"If loading the BSP file as a standalone file, ensure the current directory contains any files used by the BSP world".
well there is nothing apart from the "ikzdm1.bsp" in this folder so either it has no other information needed, or it has been forgotten to be added to the folder, and the users are without it? or I need to add something in there that I have not twigged about and must add it before something will happen.
OK thats it, now the bugs have been found and eliminated, quite honestly as it should have been shipped!! I will let you play and have fun with your first shooter that works.. hopefully.
1ghz Cel,512 sdram 133,Gf2 MX 400 64,SBL 5.1,Win98
Best Upcoming MMOG - http://WWW.Atriarch.com
Project: Card Game with No Name