Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » Vetach plugin
Re: Vetach plugin [message #438127 is a reply to message #438008] Wed, 20 October 2010 03:01 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
From your latest code, just spotted this;

else{return;Remove_Script(obj,"VT_CarryAll");}



The Remove_Script will never be called because it will return first. You should swap the order of these calls around if you want the script to get removed properly. I am a bit surprised the compiler didn't warn you about unreachable code actually...




EDIT;
Also, this check

if (o && As_ScriptableGameObj(o) && Is_Vehicle(o) && o!=obj)


Has a redundant part, a VehicleGameObj is *always* scriptable, so there's no need to test for As_ScriptableGameObj(o). You can safely remove this check to leave you with;

if (o && Is_Vehicle(o) && o!=obj)


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Wed, 20 October 2010 03:03]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [skin] Doom Door
Next Topic: [Skin] Duke 3D door
Goto Forum:
  


Current Time: Sat Dec 14 06:59:51 MST 2024

Total time taken to generate the page: 0.00911 seconds