monster_dogs in QW?
Moderator: InsideQC Admins
43 posts
• Page 2 of 3 • 1, 2, 3
The entities should be at the very top of ClientConnect() in world.qc, not defs.qc.
I only found Clientconnect() in client.qc.?
So I put it there, I'm still not spawning cujo.
Check this code for me:
- Code: Select all
void() monster_dog = //cujo
{
self.solid = SOLID_SLIDEBOX;
self.movetype = MOVETYPE_STEP;
setmodel (self, "progs/dog.mdl");
setsize (self, '-32 -32 -24', '32 32 40');
self.health = 250;
self.th_stand = dog_stand1;
self.th_walk = dog_walk1;
self.th_run = dog_run1;
self.th_pain = dog_pain;
self.th_die = dog_die;
self.th_melee = dog_atta1;
self.th_missile = dog_leap1;
walkmonster_start();
local entity dog;
dog = spawn ();
spot = SelectSpawnPoint ();
dog.origin = spot.origin;
dog.nextthink = time + 0.1;
dog.think = monster_dog;
spawn_tfog (dog.origin);
spawn_tdeath (dog.origin, dog);
};
This is at the end of void() PutClientInServer =
Getting an error:
error: expected;, found monster_dog
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
Sorry, I got confused.
ClientConnect() is in client.qc, and add the code at the very bottom of ClientConnect():
You can't put any function inside another function.
Remove the code above from monster_dog(), and move monster_dog() out PutClientInServer(), move monster_dog() above PutClientInServer().
PS: Go to the PasteBin, that I've posted modified ai.qc, fight.qc and server.qc, otherwise you may get "function was not defined" errors.
Don't forget to backup the original ones.
ai.qc:
http://www.inside3d.com/pastebin.php?action=show&id=158
fight.qc:
http://www.inside3d.com/pastebin.php?action=show&id=159
server.qc:
http://www.inside3d.com/pastebin.php?action=show&id=160
ClientConnect() is in client.qc, and add the code at the very bottom of ClientConnect():
- Code: Select all
local entity dog, spot;
dog = spawn ();
spot = SelectSpawnPoint ();
dog.origin = spot.origin;
dog.nextthink = time + 0.1;
dog.think = monster_dog;
spawn_tfog (dog.origin);
spawn_tdeath (dog.origin, dog);
You can't put any function inside another function.
Remove the code above from monster_dog(), and move monster_dog() out PutClientInServer(), move monster_dog() above PutClientInServer().
PS: Go to the PasteBin, that I've posted modified ai.qc, fight.qc and server.qc, otherwise you may get "function was not defined" errors.
Don't forget to backup the original ones.
ai.qc:
http://www.inside3d.com/pastebin.php?action=show&id=158
fight.qc:
http://www.inside3d.com/pastebin.php?action=show&id=159
server.qc:
http://www.inside3d.com/pastebin.php?action=show&id=160
-

Orion - Posts: 476
- Joined: Fri Jan 12, 2007 6:32 pm
- Location: Brazil
Have you put the specified code at the very bottom of ClientCommect() (client.qc)?
If you put, the dog won't spawn inside you, he'll spawn anywhere in the map, in any respawn spots. Mabe you didn't find one.
Just sometimes he'll spawn inside you, and when this occurs, he telefrags himself.
If you put, the dog won't spawn inside you, he'll spawn anywhere in the map, in any respawn spots. Mabe you didn't find one.
Just sometimes he'll spawn inside you, and when this occurs, he telefrags himself.
-

Orion - Posts: 476
- Joined: Fri Jan 12, 2007 6:32 pm
- Location: Brazil
Here's my ClientConnect:
Server error message:
Client redrum connected
redrum entered Spisi's Fragfest!
CALL1 13912(visible)()
ai.qc : FindTarget
ai.qc : ai_stand
dog.qc : dog_stand1
<NO FUNCTION>
NULL function
SV_Error: Program error
BTW thanks for your time and patience!
- Code: Select all
void() ClientConnect =
{
local entity dog, spot; //cujo
ClientInRankings(); // FrikBot //frikbot
bprint (PRINT_HIGH, self.netname);
bprint (PRINT_HIGH, " entered Spisi's Fragfest!\n");
// a client connecting during an intermission can cause problems
if (intermission_running)
GotoNextMap ();
//stuffcmd(self, "impulse 100;\n"); //adds a bot when player connects to server
local entity dog;
dog = spawn ();
spot = SelectSpawnPoint ();
dog.origin = spot.origin;
dog.nextthink = time + 0.1;
dog.think = monster_dog;
spawn_tfog (dog.origin);
spawn_tdeath (dog.origin, dog);
};
Server error message:
Client redrum connected
redrum entered Spisi's Fragfest!
CALL1 13912(visible)()
ai.qc : FindTarget
ai.qc : ai_stand
dog.qc : dog_stand1
<NO FUNCTION>
NULL function
SV_Error: Program error
BTW thanks for your time and patience!
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
Errors, (expected;, found self) here's the code:
- Code: Select all
void() monster_dog = //cujo
{
self.classname = "monster_dog"
self.solid = SOLID_SLIDEBOX;
self.movetype = MOVETYPE_STEP;
setmodel (self, "progs/dog.mdl");
setsize (self, '-32 -32 -24', '32 32 40');
self.health = 250;
self.th_stand = dog_stand1;
self.th_walk = dog_walk1;
self.th_run = dog_run1;
self.th_pain = dog_pain;
self.th_die = dog_die;
self.th_melee = dog_atta1;
self.th_missile = dog_leap1;
walkmonster_start_go();
};
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
Damn, I should have noticed that!
Anyway, didn't work. Server error:
Client redrum connected
redrum entered Spisi's Fragfest!
walkmonster in wall at: ' 0.0 -142.0 -183.0'
CALL1 13912(visible)()
ai.qc : FindTarget
ai.qc : ai_stand
dog.qc : dog_stand6
<NO FUNCTION>
NULL function
SV_Error: Program error
Anyway, didn't work. Server error:
Client redrum connected
redrum entered Spisi's Fragfest!
walkmonster in wall at: ' 0.0 -142.0 -183.0'
CALL1 13912(visible)()
ai.qc : FindTarget
ai.qc : ai_stand
dog.qc : dog_stand6
<NO FUNCTION>
NULL function
SV_Error: Program error
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
Ok, I was able to log in without the server crashing.
I then switched to spectator mode. I saw cujo!
I then reconnected in normal mode. When I came into cujo's view it then crashed.
I tried it twice, and the same thing happened.
I then switched to spectator mode. I saw cujo!
I then reconnected in normal mode. When I came into cujo's view it then crashed.
I tried it twice, and the same thing happened.
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
The error seems to be suggesting that the function called "visible" is a null_function. That probably means you've made a prototype for the function but not actually defined it. If you add the "visible" function to the end of the ai file then it should prevent that crash.
- Preach
- Posts: 122
- Joined: Thu Nov 25, 2004 7:20 pm
Urre wrote:Is it even compileable without defining prototypes? Or maybe that's just a warning?
Pretty sure it's just a warning in fte and probably frikqcc since they support all the function pointers stuff. Prototyping is kinda like defining the function and assigning it a null pointer, then giving it the correct pointer when you actually define it (I'd imagine). Having a null pointer for a function might be useful for extension checking or something.
- Preach
- Posts: 122
- Joined: Thu Nov 25, 2004 7:20 pm
43 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 1 guest
