Hey i wanted to see if someone could take look at my mod files see why it will not display the message in the middle of the screen i'm sure i have it all right.
Download files: http://mxcms.co/mx_mod.zip
issues with mod
Moderator: Core Staff
-
- CJ Wannabe
- Posts: 23
- Joined: October 21st, 2007, 7:58 am
- Gamertag: mox123456
- Location: Saint Louis, MO
- Contact:
issues with mod
i wove pedsdude and nightmare 

-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: issues with mod
Firstly you receive an error:
Line 671 of _hud_util.gsc
There are no other references to "level.inReadyUpPeriod" in your code, I assume it has ties to another mod that your does not use.
Simple fix - Remove the offending code.
________________________________________________________________________
Your second error is:Line 103 of _mx.gsc
You are checking to see the value of a variable, but you have yet to define/initialise the variable.
Simple fix: check if the variable is defined first "if(isDefined(var) && var)"
________________________________________________________________________
Your third error is:Line 105 of _mx.gsc
You have again not initialised the variable (or in this case the array).
Simple fix: Add "arrayName = [];" before you try to use the array.
________________________________________________________________________
At this point you now have messages displayed.
You do not have any errors, but you do have a problem or two.
Problem 1: Your text displays straight away (as opposed to after the player spawns)
(Simply add a "self waittill("spawned");" call in your dowelcome function.
Problem 2: Your text is repeating twice.
(You are calling "onplayerconnect" twice, so you get twice the action).
Let me know how you get on.
Code: Select all
if ( level.inReadyUpPeriod )
There are no other references to "level.inReadyUpPeriod" in your code, I assume it has ties to another mod that your does not use.
Simple fix - Remove the offending code.
________________________________________________________________________
Your second error is:
Code: Select all
if(self.doinghud)
You are checking to see the value of a variable, but you have yet to define/initialise the variable.
Simple fix: check if the variable is defined first "if(isDefined(var) && var)"
________________________________________________________________________
Your third error is:
Code: Select all
self.mxhudQueue[self.mxhudQueue.size] = hudstuff;
You have again not initialised the variable (or in this case the array).
Simple fix: Add "arrayName = [];" before you try to use the array.
________________________________________________________________________
At this point you now have messages displayed.
You do not have any errors, but you do have a problem or two.
Problem 1: Your text displays straight away (as opposed to after the player spawns)
(Simply add a "self waittill("spawned");" call in your dowelcome function.
Problem 2: Your text is repeating twice.
(You are calling "onplayerconnect" twice, so you get twice the action).
Let me know how you get on.

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- CJ Wannabe
- Posts: 23
- Joined: October 21st, 2007, 7:58 am
- Gamertag: mox123456
- Location: Saint Louis, MO
- Contact:
Re: issues with mod
Drofder2004 wrote:Firstly you receive an error:Line 103 of _mx.gscCode: Select all
if(self.doinghud)
You are checking to see the value of a variable, but you have yet to define/initialise the variable.
Simple fix: check if the variable is defined first "if(isDefined(var) && var)"
________________________________________________________________________
Your third error is:Line 105 of _mx.gscCode: Select all
self.mxhudQueue[self.mxhudQueue.size] = hudstuff;
You have again not initialised the variable (or in this case the array).
Simple fix: Add "arrayName = [];" before you try to use the array.
________________________________________________________________________
At this point you now have messages displayed.
You do not have any errors, but you do have a problem or two.
Let me know how you get on.
I've fixed the the small errors that you said but the above one's i'm very confused on where to add the lines of code to. Under this i have take out all the other code just need help on this one function.
Code: Select all
nowdohud(hudstuff)
{
self endon("disconnect");
if(self.doinghud)
{
self.mxhudQueue[self.mxhudQueue.size] = hudstuff;
return;
}
self.doinghud = true;
duration = 5.0;
glowColor = (1,0,0);
glowAlpha = 1;
hudstuff.type setPoint( "CENTER", "CENTER", 0, 100);
hudstuff.type setPulseFX(40, int(duration*1000), 1000);
hudstuff.type.glowColor = glowColor;
hudstuff.type.glowAlpha = glowAlpha;
hudstuff.type.alpha = 1;
hudstuff.type.label = &"";
if(isDefined(hudstuff.msg))
self.notifyText setText(hudstuff.msg);
wait 2;
self.doinghud = false;
if(self.mxhudQueue.size > 0)
{
hudstuff = self.mxhudQueue[0];
newQueue = [];
for (i=1;i<self.mxhudQueue.size;i++)
self.mxhudQueue[i-1] = self.mxhudQueue[i];
self.mxhudQueue[i-1] = undefined;
self thread nowdohud(hudstuff);
}
}
i wove pedsdude and nightmare 

Who is online
Users browsing this forum: No registered users and 0 guests