View Full Version : Return to sender???
legacy-the Adster
09-04-2003, 12:23 PM
Trying to get a new mod off the ground (I have produced many mods for vanilla UT) but can't seem to get a function to return a value for me. I'm not sure why it's happening (hence this thread) but it's really starting to grate my cheese.
The code for the function is as follows (edited to only include the relevant lines)
function FindThisPlayer( Controller DeadGuy)
{
return True;
}
The compiler keeps telling me there's a ; missing before True
Any help would me much appreciated, including a mention in the ReadMe.
legacy-Haral
09-04-2003, 01:05 PM
You need to give a type to the function for it to be able to return a value. In this case it would be:
function bool FindThisPlayer(Controller DeadGuy)
For more information:
http://wiki.beyondunreal.com/wiki/Function_Syntax
legacy-the Adster
09-04-2003, 01:35 PM
Changed the function as you suggested but now the function recieving the return value is giving my stress. It just doesn't seem to want to play ball (the compiler says there is a Bad or missing expression where I'm trying to decide if the value is True or False)
It must be something to do with my head, but I just don't seem to be getting on with UT2k3 scripting (the fact that UnrealEd 3 doesn't work on my gaming machine is another small issue I'm having to battle with)
legacy-Kaoh
09-04-2003, 02:06 PM
there are 2 ways to use a return value:
myvalue = findthisplayer(seekcontroller);
or something like
if (findthisplayer(seekcontroller)) {
...
}
myvalue and the if should use the correct value in this case the bool
seekcontroller i just made up as example.
good luck
Sir_Brizz
09-05-2003, 04:01 AM
^^^^^^^^^^^^^^
myValue would be a
local bool myValue;
legacy-the Adster
09-07-2003, 11:36 PM
Sorted out all the (minor) problems I was having with the code, the final mutator should be ready for release in the next couple of weeks.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.