Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Issues with Radar Goto page 1, 2 Next

| Inside3d Forums Forum Index -> Tutorial Help

View previous topic :: View next topic
Author | Message
--- | ---
ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Tue Sep 16, 2008 7:23 pm Post subject: Issues with Radar |

My error log

Code:
warning: Q202: ai.qc:275:FindTarget must return a value warning: Q203: ai.qc:442:CheckAnyAttack does not return a value warning: Q203: ai.qc:446:CheckAnyAttack does not return a value warning: Q203: ai.qc:450:CheckAnyAttack does not return a value
warning: Q203: ai.qc:454:CheckAnyAttack does not return a value
warning: Q203: ai.qc:458:CheckAnyAttack does not return a value
warning: Q203: ai.qc:462:CheckAnyAttack does not return a value
warning: Q203: ai.qc:464:CheckAnyAttack does not return a value
warning: Q105: items.qc:30:droptofloor: Too few parameters. See definition defs.qc(365)
warning: Q206: client.qc:112:FindIntermission: not all control paths return a value
error: Q505: client.qc:306:Unknown value "void"
error: Q505: client.qc:465:Unknown value "func_radar"
warning: Q106: client.qc:781:Assignment to constant

The tutorial
http://inside3d.com/showtutorial.php?id=14
if its needed ill post up my qc's
_________________
QuakeDB - Quake ModDB Group

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Wed Sep 17, 2008 4:54 am Post subject: |

also getting an error "unknown command" here:

Code:
{ self.flash_flag = FALSE; W_SetCurrentAmmo (); self.flash.think = sub_remove; self.flash.nextthink = time + 0.1;
}

in the flashlight tutorial.
_________________
QuakeDB - Quake ModDB Group

Back to top |

Error Inside3D Staff Joined: 05 Nov 2004 Posts: 558 Location: VA, USA

Posted: Wed Sep 17, 2008 5:14 am Post subject: |

to fix flashlight QC compiler is case sensitive. change sub_remove to SUB_Remove _________________ Inside3D : Knowledge Is Power Darkplaces Documentation Wiki

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Wed Sep 17, 2008 5:20 am Post subject: |

thats what it was before but ill try again really quick "Yep same thing" i removed that line and it compiles and i can turn the flash light on using impulse 30 in the console, once i get this fixed is there a way i can assign impulse 30 to a key?
_________________
QuakeDB - Quake ModDB Group

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Wed Sep 17, 2008 5:36 am Post subject: |

Yup. To assign any command to a key use the "bind" command in the console: bind <key> "command" For example: bind f "impulse 30" Alternately, you can make an alias (such as in autoexec.cfg) and then bind that:
alias flashlight "impulse 30"
bind f "flashlight"
That gets useful if you need things to happen only while the key is held down (like the flashlight turns off automatically when they release the key).
alias +flashlight "impulse 30"
alias -flashlight "impulse 31"
bind f "+flashlight"
Hope that helps!
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Wed Sep 17, 2008 5:40 am Post subject: |

well i tried binding f to impulse 30 ingame cuz i knew u could bind things but it didnt work, let me try ur alias thing. i may not need the sub part of the code. the bind works now to get it to where the flash light toggles -.- cuz i been doing some testing and if u cant turn the flashlight off it just gets brighter and brighter and brighter till it slows ur pc down... lol
_________________
QuakeDB - Quake ModDB Group

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Wed Sep 17, 2008 6:11 am Post subject: |

GRR... iv tried crap loads of things but i cant get "SUB_Remove" to work i even looked in the Subs.qc to see if it was wrong at all and thats exactly the same? anyone have any idea why it isnt working? "sorry for double post" EDIT: I FIXED IT! it wasnt compiling subs before the new "flash.qc" i made because he said put it under "defs.qc" when it should go below subs! so it didnt reconize that SUB_Remove was part of the code and so it did realize that "SUB_Remove" was infact a command!
thanks for your guy's help with that.
Does anyone know anything about the radar thing? i had it compile with 0 Errors but nothing happened in game.
EDIT2: oh and for anyone who cares
EDIT3: Radar's still not working... i got the entire code to almost compile . it has 0 warnings and 1 error unkown Value "void"
This is where it messes up....

Code:
} self.think = radar_think; void () func_radar = { if (!self.model)
setsize (self, '-100 -100 -100', '100 100 100');
else
{
setmodel (self, self.model);

_________________
QuakeDB - Quake ModDB Group

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Thu Sep 18, 2008 5:07 pm Post subject: |

bump i know you guys are prolly annoyed i just did this , because i do know its rude... but i really need help with this, no matter what iv tried i cant get it to work. either the tutorials wrong... or well im just an idiot ... which is prolly the case ....
anyways even a reply with "i dont think anyone wants to help you" would be appreciated ... thanks again guys for what you have helped me with ....

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Thu Sep 18, 2008 6:50 pm Post subject: |

It looks like your code is missing a } at the end of the function, right before the "void () func_radar =" line. Did you delete something by accident? The tutorial says the end of that function should probably be: self.think = radar_think; self.nextthink = time + self.cnt;
};
If this radar code doesn't do what you want, you could steal the radar code from my voidents mod. My site (static.condemned.com) is gone now, but I suppose Cheapalert would have it on his archives site. I could upload it if all else fails.
However, your code will probably work when you fix this one bug. I hope that helps!
EDIT: Oh and BTW, we're not annoyed. I just don't notice sometimes when replies are posted, so I didn't see that you still needed help. Sorry 'bout that.
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Thu Sep 18, 2008 9:21 pm Post subject: |

well he says to put it in between those things. but ill try and play around abit , you gave me an idea, honstely all i really want is a 2d radar i can put in the top right corner of my screen, but this will do, id also like it to be moddable to where if your a certain class you can see enemys on it also. but that can come later.
thank you for your help ^.^
well im still getting the same error, even after redoing everything like 30 times again....
here's the qc code that has something wrong with it. ( it messes up at step two in the tut.)

Code:
// VENOMUS START void () radar_think = { local entity head; head = nextent (world);
while (head != world)
{
if (head.health > 0)
{
if (head.classname == "player")
{
local vector bliporg;
bliporg = '0 0 0';
bliporg_x = (head.origin_x /
self.punchangle_x) + self.origin_x;
bliporg_y = (head.origin_y /
self.punchangle_y) + self.origin_y;
bliporg_z = (head.origin_z /
self.punchangle_z) + self.origin_z;
local entity blip;
blip = spawn ();
setorigin (blip, bliporg);
setmodel (blip, "progs/s_bubble.spr");
blip.think = SUB_Remove;
blip.nextthink = time + self.cnt;
}
}
head = nextent (head);
}
self.think = radar_think;
void () func_radar =
{
if (!self.model)
setsize (self, '-100 -100 -100', '100 100 100');
else
{
setmodel (self, self.model);
local vector org;
org = '0 0 0';
org_x = (self.maxs_x + self.mins_x) / 2;
org_y = (self.maxs_y + self.mins_y) / 2;
org_z = (self.maxs_z + self.mins_z) / 2;
setorigin (self, org);
}
if (!self.cnt)
self.cnt = 1;
self.punchangle = '0 0 0';
self.punchangle_x = 8192 / self.size_x;
self.punchangle_y = 8192 / self.size_y;
self.punchangle_z = 8192 / self.size_z;
self.solid = SOLID_NOT;
self.movetype = MOVETYPE_NONE;
self.think = radar_think;
self.nextthink = time + self.cnt;
};
// VENOMUS END
self.nextthink = time + selfMUS END

Back to top |

CocoT Joined: 14 Dec 2004 Posts: 599 Location: Belly-Gum |

Posted: Thu Sep 18, 2008 11:27 pm Post subject: |

head = nextent (head); } self.think = radar_think; } void () func_radar =
{
if (!self.model)
This could be the issue.
_________________
http://www.planetcocot.net/

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Thu Sep 18, 2008 11:31 pm Post subject: |

i added that in, and it says self is not a type now.

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Fri Sep 19, 2008 12:11 am Post subject: |

Okay, here's what happened. You seem to have pasted the func_radar function into the wrong place (inside of the function above it, instead of below where the function ended). It's only a few lines difference, but that's a huge deal in computer code. The self.nextthink line at the very bottom of the code was supposed to be at the bottom of radar_think (followed by a closing } brace). In fact, part of that line seems to have been nuked and replaced by MUS END. O_o
Whatever happened, here's what your code needs to look like:

Code:
// VENOMUS START void () radar_think = { local entity head; head = nextent (world);
while (head != world)
{
if (head.health > 0)
{
if (head.classname == "player")
{
local vector bliporg;
bliporg = '0 0 0';
bliporg_x = (head.origin_x / self.punchangle_x) + self.origin_x;
bliporg_y = (head.origin_y / self.punchangle_y) + self.origin_y;
bliporg_z = (head.origin_z / self.punchangle_z) + self.origin_z;
local entity blip;
blip = spawn ();
setorigin (blip, bliporg);
setmodel (blip, "progs/s_bubble.spr");
blip.think = SUB_Remove;
blip.nextthink = time + self.cnt;
}
}
head = nextent (head);
}
self.think = radar_think;
self.nextthink = time + self.cnt;
};
void () func_radar =
{
if (!self.model)
setsize (self, '-100 -100 -100', '100 100 100');
else
{
setmodel (self, self.model);
local vector org;
org = '0 0 0';
org_x = (self.maxs_x + self.mins_x) / 2;
org_y = (self.maxs_y + self.mins_y) / 2;
org_z = (self.maxs_z + self.mins_z) / 2;
setorigin (self, org);
}
if (!self.cnt)
self.cnt = 1;
self.punchangle = '0 0 0';
self.punchangle_x = 8192 / self.size_x;
self.punchangle_y = 8192 / self.size_y;
self.punchangle_z = 8192 / self.size_z;
self.solid = SOLID_NOT;
self.movetype = MOVETYPE_NONE;
self.think = radar_think;
self.nextthink = time + self.cnt;
};
// VENOMUS END

I hope that fixes it for you.
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA |

Posted: Fri Sep 19, 2008 12:40 am Post subject: |

now it says "code" is not a type and "radar_think" is an unknown command

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Fri Sep 19, 2008 5:14 pm Post subject: |

I guess you don't know any C stuff at all. Don't copy the CODE: line at the top of the code I posted. That's not part of the code, it's just the forum telling you that the stuff below it is the code. Please, look carefully at what you're doing before blindly doing it. The stuff you should copy from my post starts with // VENEMOUS START and ends with // VENEMOUS END
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Tutorial Help | All times are GMT Goto page 1, 2 Next
Page 1 of 2

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group