View Single Post
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