Raised This Month: $51 Target: $400
 12% 

Undefined Symbol


Post New Thread Reply   
 
Thread Tools Display Modes
Marcus_Brown001
AlliedModders Donor
Join Date: Nov 2012
Location: Illinois, United States
Old 01-28-2014 , 02:11   Re: Undefined Symbol
Reply With Quote #41

I went and found it myself, but in the future, do attach everything that is required to compile your plugin. Most people who can help you are not going to download extra includes to do so.

Quote:
Originally Posted by QOOOOOOOOQ View Post
Woah woah now... haven't even got done posting it lol... try again.
You posted that at 12:17 am my time. I posted at 12:22 am. You edited at 12:24 am. You posted, again, at 12:25 am. You can say what you want, but I find it weird that it takes close to ten minutes to finish posting something, when all you did was add three lines to the post. I am up unusually late, and I am trying to help you. Don't throw me bullshit. It is an honest mistake to do, I was simply pointing it out. So, instead of trying to make it appear one way, just own up to it. It saves time and trouble. For instance, the time I spent writing this extra paragraph could have been better applied to sleeping at this late hour.

Anyways, down to business. When I try to compile your plugin, I get 26 errors. Also a future note, when saying you have "some errors", why don't you post what the compiler gives you, instead of paraphrasing? It would save some time no doubt. The reason I say this is 11530 was correct, you were missing a closing bracket. If you would have posted exactly what it told you, we could have directed you exactly where to look. I opened your file, and found the issue in under a minute. You posted this thread nine days ago. It could have been solved on day one if you posted the required material. Line 1676: add a closing bracket on line 1677.

Once doing this the plugin still has 25 errors. The next two are:
PHP Code:
(992) : error 017undefined symbol "hDrawReadyPanelListTeam"
(994) : error 017undefined symbol "hDrawReadyPanelListTeam" 
Those are because the handle hDrawReadyPanelListTeam does not exist. That is a simple fix. That brings me to the error:
PHP Code:
(998) : error 017undefined symbol "bGamePaused" 
Lines 127-129 you have commented off. The relevance to this is if you comment out the variable, you should search the plugin for all occurrences and fix them, otherwise, you get this problem. For the sake of getting to compile, I reinitialized them. That leads me to the next three errors:
PHP Code:
(1403) : error 017undefined symbol "vInfTeamAmt"
(1411) : error 017undefined symbol "hSwapTwoTimer"
(1419) : error 017undefined symbol "vClientTwo" 
The first of those three is an easy one. I will let the wiki take that one. The second error is also quick and easy, but it seems to be a re-occurring issue in this plugin. If you wish to use a variable, be it a string, handle, or what-have-you, you must initialize it. When you fail to do so, the compile does not know what it is, so it spits the error. Only twenty errors to go ... Now line 1421: I have absolutely no idea what vClientTwo is suppose to be, so I commented out the line to get rid of the error. Oh, now we have a fun error.
PHP Code:
(1470) : error 033: array must be indexed (variable "-unknown-"
I am quite certain you cannot use switch strings or handles. Above this, you have the line StringToInt(sTeamName) which is good, but it does no good up there. So, we put that inside of the switch statement. Now next on the list is a warning for tag mismatch. It is a custom function, and I am not going to dig around trying to find it. What it means is that you are placing a variable with the wrong tag in that spot. The most common are when you supply an integer where a float should be, or a string where a handle is, or things of that nature. That leads me to the next two warnings:
PHP Code:
(1585) : warning 211possibly unintended assignment
(1598) : warning 211possibly unintended assignment 
When you are comparing two things, you use two equal signs. When you are assigning a value to something, you use one. That is the cause behind those two warnings. The next two errors are:
PHP Code:
(1644) : error 017undefined symbol "hPausableCvar"
(1648) : error 017undefined symbol "hPausableCvar" 
The reason has been already mentioned. I will just reference lines 69-71. At first, I thought it was the same issue with these next two errors
PHP Code:
(1657) : error 017undefined symbol "hAnnounceDisconnectPack"
(1658) : error 017undefined symbol "hAnnounceDisconnectPack" 
however, I was wrong. It seems that it was a copy/paste mistake. Easily fixed. Although the next three errors are caused by not initializing the variables:
PHP Code:
(1661) : error 017undefined symbol "vNewTeam"
(1667) : error 017undefined symbol "vTeamName4"
(1669) : error 017undefined symbol "vTeamName4" 
Easily fixed. The next errors I am coming across all have to do with line 1669. Keep in mind that by now, my copy and your copy are no doubt very different. To be specific, here is the line:
PHP Code:
if (((GetClientTeam(vClient) != && vTeamName4(vWho) != 1) || (vTeamName4(vWho) == 1)) && IsClientInGame(who)) 
Now, it took me a minute to figure out that vTeamName4 is not a function. It is a variable. That is also an easy fix. In the same section, you will find errors for undefined symbol "who". Those are also easy to fix.

I would keep going, but after fixing those last errors the error count went back up to 18. I do believe I have provided you with more than enough information to fix the remaining issues.

Last edited by Marcus_Brown001; 01-28-2014 at 02:19.
Marcus_Brown001 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 01-28-2014 , 02:23   Re: Undefined Symbol
Reply With Quote #42

You're missing an ending } at the end of Timer_AnnouncePlayerTeam

EDIT: holy shit ridiculous ninja lol
__________________

Last edited by ddhoward; 01-28-2014 at 02:25.
ddhoward is offline
QOOOOOOOOQ
Senior Member
Join Date: Dec 2012
Old 01-28-2014 , 02:50   Re: Undefined Symbol
Reply With Quote #43

Quote:
Originally Posted by Marcus_Brown001 View Post
I would keep going, but after fixing those last errors the error count went back up to 18. I do believe I have provided you with more than enough information to fix the remaining issues.
Thanks... The reason for the vTeamName# variables is because they were all vTeamName, and was pulling scope errors, saying it was found on a preceding level etc, when they were all in their own functions... AFAIK none were global, and I double checked, none were global. That went for EVERY occurrence of vTeamName.

Last edited by QOOOOOOOOQ; 01-28-2014 at 02:53.
QOOOOOOOOQ is offline
Marcus_Brown001
AlliedModders Donor
Join Date: Nov 2012
Location: Illinois, United States
Old 01-28-2014 , 09:44   Re: Undefined Symbol
Reply With Quote #44

Yeah ... I have gotten a errors with shadows another variable at a preceding level when the scope doesn't reach there O.o I haven't seen though in awhile though, and the only way I know how to fix them is to rename your variables .
Marcus_Brown001 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 01-28-2014 , 14:09   Re: Undefined Symbol
Reply With Quote #45

OMG QOOOOOOOOQ,
You telling the truth. >.<"

I lend my help after 20 hrs from now if this still not fixed.

Marcus_Brown001,
you may post the plugin that you already half fix for other to continue if you dont mind.
I m kinda down seeing those error piling up.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 01-28-2014 , 15:13   Re: Undefined Symbol
Reply With Quote #46

Well, I'm glad our answers - 20 minutes after the thread was first made - were correct. Just took another nine days for enough people to agree. Most of us have been programming long enough that we know what to expect when we find an error, and how to quickly fix it. It's similar to making a small change to your code, getting 100 errors, and knowing you've only missed a semicolon somewhere. You are now part of this group, and will forever be looking for curly brackets upon undeniably defining a symbol yet still seeing an "Undefined symbol" error.
__________________
11530 is offline
Marcus_Brown001
AlliedModders Donor
Join Date: Nov 2012
Location: Illinois, United States
Old 01-28-2014 , 15:37   Re: Undefined Symbol
Reply With Quote #47

Quote:
Originally Posted by GsiX View Post
OMG QOOOOOOOOQ,
Marcus_Brown001,
you may post the plugin that you already half fix for other to continue if you dont mind.
I m kinda down seeing those error piling up.
I removed the copy of the plugin I had after I posted that, sorry. The errors where all simple mistakes. It took me so long to do because I was documenting what I was doing. If you just open it up and fix the mistakes, it should take you no more than 5-10 minutes.

Last edited by Marcus_Brown001; 01-28-2014 at 15:37.
Marcus_Brown001 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 01-28-2014 , 21:33   Re: Undefined Symbol
Reply With Quote #48

You mean you only get rid of the warning without concern of the plugin functionality?

Awww...
If this the case i do not participate.. *sight*
>.<"
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Marcus_Brown001
AlliedModders Donor
Join Date: Nov 2012
Location: Illinois, United States
Old 01-28-2014 , 22:24   Re: Undefined Symbol
Reply With Quote #49

Quote:
Originally Posted by GsiX View Post
You mean you only get rid of the warning without concern of the plugin functionality?
I went through and told him how to fix quite a few errors, and the ones I didn't do he should be able to figure out by the information from the other ones; however, at the end of the day it wasn't my plugin so I didn't have a lot of concern for it. If I were trying to compile a plugin and it spit me over twenty errors I wouldn't give a rat's ass about functionality at that point in time. I would be worried about getting the plugin to compile. Once compiled, I could then test the features and work from there. Understanding what something is going to do, or how it will preform is great, but it gets you nowhere if the plugin won't compile.
Marcus_Brown001 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode