View Single Post
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 05-22-2010 , 16:28   Re: [L4D] Revive With First Aid Kit
Reply With Quote #18

warnings are due to many things

you are using global variable names that sourcemod also uses.. time & pos (you define this one twice as a global and a local). rename them to ANYTHING that sourcemod doesnt use (eg: g_time, g_pos)

also loose indentation line 123: you go from 2 tabs on the line above to 7 spaces (which doesnt even equal 2 tabs).
285 has a space + 2 tabs - remove the space
286 is all spaces instead of 2 tabs.

tag mismatch.. on lines 124, 135, 137, 149, 150, 152, 254, 264, 356, 358 your setting a float as an int, change the 0 to 0.0

174 and 208 you define client.. twice. its being passed in (for no reason) and defined on those lines. remove the any:client from watch (and then replace the 0 in the createtimer line with an _.

line 29: remove the unused var Enabled
line 213: remove the unused var ok (and its global definition above Watch)
line 305: remove the unused var s_TargetName

fixing all that and recompiling, you then get loose indentation in OnClientDisconnect.. fix all the lines that need it (~ lines 146-154).

a new tag mismatch shows up.. because you define time as a float, and set it as an int.. the compiler didnt care about this before because of the double definition. change the 0 to 0.0 on whatever you renamed time to.

once all that is done - your warnings go away.
dirka_dirka is offline