# Strange things with g\_local.h \[please Help!\]

**URL:** <https://discourse.ioquake.org/t/strange-things-with-g-local-h-please-help/1458>\
**Category:** Uncategorized\
**Created:** [April 13, 2020, 9:43am UTC](https://discourse.ioquake.org/t/strange-things-with-g-local-h-please-help/1458 "2020-04-13T09:43:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![q3beginnner](https://avatars.discourse-cdn.com/v4/letter/q/3be4f8/32.png) [@q3beginnner](https://discourse.ioquake.org/u/q3beginnner)\
**Post date:** [April 13, 2020, 9:43am UTC](https://discourse.ioquake.org/t/strange-things-with-g-local-h-please-help/1458/1 "2020-04-13T09:43:36Z")

</div>

Hi, everyone! I’m a novice on this site. Just several days ago I became interested in ioquake3 project, after couldn’t run original compiled sources of Q3 on my windows 🤣

After I could do it with ioquake3, I found a good book that explains some things in  
Q3 modding(I think all of you know it): [http://index-of.co.uk/Game-Development/Programming/Focus%20on%20Mod%20Programming%20In%20Quake%20III%20Arena.pdf](http://index-of.co.uk/Game-Development/Programming/Focus%20on%20Mod%20Programming%20In%20Quake%20III%20Arena.pdf)

Today I’ve started with the first exercise from it, where author explains the implementation of homing missile. When I implemented required functions in g\_utils.c, I had to write their definitions in g\_local.h. I made my way to the end of the file and wrote the definitions of the declared functions(957 and 958 number of lines). Compiled it and that’s what I’ve got:

 ![2ZzoEq6kvGg](https://canada1.discourse-cdn.com/flex030/uploads/ioquake/original/1X/3b99e468bb10e35ae3837e676c27a16785a046d4.jpeg)

I started googling this error, and found answers such as this can happen if path of my program contains spaces or launching Visual Studio via administrator’s name can solve the problem, but non of these helped.  
I tried to experiment and place these 2 lines of function’s definitions a bit upper in local.h where all functions from g\_utils.c are defined. And wow, it has compiled and gave \*qvm files.  
I don’t really understand what’s going on with the compiling process and why I can’t define the functions anywhere I want in \*.h file.  
As far as I understand there are maybe some conflicts in translating code to bytecode via virtual machine, but I don’t understand anything about such processes  
Could somebody please explain it to me what’s the problem with that? Are there any limitations for line of code or smth like that? I’m really confused. 😧

P.S. I use Visual Studio 2015  
P.P.S Sorry for my broken English

---

<div class="post-metadata">

**Author:** ![jpcy](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.ioquake.org/jpcy/32/270_2.png) [@jpcy](https://discourse.ioquake.org/u/jpcy)\
**Post date:** [April 14, 2020, 1:11am UTC](https://discourse.ioquake.org/t/strange-things-with-g-local-h-please-help/1458/2 "2020-04-14T01:11:32Z")

</div>

The q3asm return value (26) is the number of errors - Googling won’t give relevant results. Check the “Output” window in VS for error messages, but they may not print. If you build `baseq3_qagame_dll` instead you will see any compile errors.

---

<div class="post-metadata">

**Author:** ![q3beginnner](https://avatars.discourse-cdn.com/v4/letter/q/3be4f8/32.png) [@q3beginnner](https://discourse.ioquake.org/u/q3beginnner)\
**Post date:** [April 14, 2020, 5:05am UTC](https://discourse.ioquake.org/t/strange-things-with-g-local-h-please-help/1458/3 "2020-04-14T05:05:52Z")

</div>

Thanks for the reply.  
Yes, the baseq3\_qagame\_dll compiles without any problems.  
The problem I faced with was because I didn’t leave an empty line in \*.h file. Found out it experimentally 😂
