Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!
Moderator: Core Staff
-
Rezil
- Core Staff
![Core Staff Core Staff](./images/ranks/core_staff.jpg)
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Post
by Rezil » November 2nd, 2010, 7:18 pm
Code: Select all
func()
{
num_origins = 5;
for(i=0;i<=num_origins;i++) o[i] = getent("whatever"+i,"targetname");
t = getent("whatever_trig","targetname");
for(;;)
{
t waittill("trigger", user);
user setorigin(o[0].origin);
user setplayerangles(o[0].angles);
}
}
Why does this give me an 'uninitialized variable o' error?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
IzNoGoD
- CJ Worshipper
![CJ Worshipper CJ Worshipper](./images/ranks/worshipper.jpg)
- Posts: 343
- Joined: January 6th, 2009, 8:39 pm
- Location: Netherlands/Holland
Post
by IzNoGoD » November 2nd, 2010, 8:09 pm
It most likely errors on the user setorigin(o[0].origin); correct?
This is because cod is stupid and thinks it can skip for() loops on compilecheck.
Make o=[]; before that loop and you're fine
LMGTFY!
Its not a glitch... Its the future!
-
Rezil
- Core Staff
![Core Staff Core Staff](./images/ranks/core_staff.jpg)
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Post
by Rezil » November 2nd, 2010, 8:13 pm
Ah yeah, forgot that. Thanks.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Users browsing this forum: No registered users and 17 guests