Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] Emergency Treatment With First Aid Kit And CPR


Post New Thread Reply   
 
Thread Tools Display Modes
panxiaohai
Senior Member
Join Date: Mar 2010
Old 05-19-2010 , 00:46   Re: [L4D] Revive With First Aid Kit
Reply With Quote #11

Quote:
Originally Posted by homerliew View Post
How did you change the instructions? Because everytime I try to compile the file. It gives me error and it doesn't get compiled.
Please show me the error messages, and I think it is the problem of file format, the file's format is UTF-8 without BOM, please change the file format.
panxiaohai is offline
alexip121093
Senior Member
Join Date: Dec 2009
Location: Hong Kong
Old 05-19-2010 , 02:41   Re: [L4D] Revive With First Aid Kit
Reply With Quote #12

or delete all the chinese
alexip121093 is offline
Send a message via MSN to alexip121093
panxiaohai
Senior Member
Join Date: Mar 2010
Old 05-19-2010 , 05:08   Re: [L4D] Revive With First Aid Kit
Reply With Quote #13

Quote:
Originally Posted by alexip121093 View Post
or delete all the chinese
Why?

Last edited by panxiaohai; 05-19-2010 at 05:19.
panxiaohai is offline
alexip121093
Senior Member
Join Date: Dec 2009
Location: Hong Kong
Old 05-19-2010 , 05:48   Re: [L4D] Revive With First Aid Kit
Reply With Quote #14

Quote:
Originally Posted by panxiaohai View Post
Why?
You think they understand chinese?
And the Chinese cause compile error
Code:
PrintToChatAll("\x01[sea]\x04%N \x03救活了 \x04%N", client, dead);
alexip121093 is offline
Send a message via MSN to alexip121093
panxiaohai
Senior Member
Join Date: Mar 2010
Old 05-19-2010 , 09:21   Re: [L4D] Revive With First Aid Kit
Reply With Quote #15

Quote:
Originally Posted by alexip121093 View Post
You think they understand chinese?
And the Chinese cause compile error
Code:
PrintToChatAll("\x01[sea]\x04%N \x03救活了 \x04%N", client, dead);
Very very Sorry for that, It is my fault, I will fix it, Thanks.
panxiaohai is offline
Danny_l4d
Senior Member
Join Date: Feb 2010
Old 05-22-2010 , 00:14   Re: [L4D] Revive With First Aid Kit
Reply With Quote #16

I am using this plugin in my server also... to try it out.

It gives an error on the "msg" part...
I removed this part and compiled it again it gives now (only) "32 Warnings"
I also changed some other things like the colors and the text for now it works good..
__________________
Danny_l4d is offline
panxiaohai
Senior Member
Join Date: Mar 2010
Old 05-22-2010 , 11:42   Re: [L4D] Revive With First Aid Kit
Reply With Quote #17

Quote:
Originally Posted by Danny_l4d View Post
I am using this plugin in my server also... to try it out.

It gives an error on the "msg" part...
I removed this part and compiled it again it gives now (only) "32 Warnings"
I also changed some other things like the colors and the text for now it works good..

I think it is the problem of file format. please copy all texts of the file and paste it to a new sp file.
panxiaohai is offline
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
panxiaohai
Senior Member
Join Date: Mar 2010
Old 05-22-2010 , 22:31   Re: [L4D] Revive With First Aid Kit
Reply With Quote #19

Quote:
Originally Posted by dirka_dirka View Post
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.
You are professional and have a kind heart. Thank you very much.
panxiaohai is offline
OtterNas3
Senior Member
Join Date: Apr 2009
Old 05-24-2010 , 23:05   Re: [L4D] Revive With First Aid Kit
Reply With Quote #20

Very good idea! I like the plugin just did some changes and fixes to it, if youre interested feel free to put it in next version maybe.


Code cleanup, removed unnecessary variables, renamed the sourcemod ones (time, pos)

Removed Message-Timer completely.
Added Message instead, showing to all Survivor's have a Medkit left.

http://www.youtube.com/watch?v=BjGPOeAFws0



Cheers,
OtterNas3
Attached Files
File Type: smx l4d_revive.smx (8.6 KB, 282 views)
File Type: sp Get Plugin or Get Source (l4d_revive.sp - 843 views - 9.2 KB)
OtterNas3 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 04:19.


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