Post: Script compile error uninitialised variable 'notifydata' please help
01-28-2011, 10:35 PM #1
dogyplop
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({});
Originally posted by another user
iLVL70(){
self setPlayerData( "experience" , 2516000 );
notifyData.titleText = "You are level 70 now!";
notifyData.notifyText = "Leave and Prestige.";
notifyData.notifyText2 = "Then Join back.";
notifyData.glowColor = (0.5, 0.0, 0.Cool Man (aka Tustin);
notifyData.sound = "mp_level_up";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );}


help = +rep
(adsbygoogle = window.adsbygoogle || []).push({});
01-28-2011, 10:37 PM #2
Originally posted by dogyplop View Post
help = +rep


Make sure that your variable isn't in a scope, and it's global.

example

    
int MyNumber;

int main()
{
//I can read MyNumber
}
void OtherFunction()
{
//and so can I
}


This might be the problem
    
int main()
{
int MyNumber;
//I can read MyNumber
}
void OtherFunction()
{
//Wtf is MyNumber?
}


Also, make sure that you have given notifyData some value.

Taken straight from wikipedia:
In computing, an uninitialized variable is a variable that is declared but is not set to a definite known value before it is used. It will have some value, but not a predictable one. As such it is a programming error and a common source of bugs in software.
A common assumption made by novice programmers is that variables are set to a known value, such as zero, when they are declared. While this is true for many languages, it is not true for all of them, and so the potential for error is there. Languages such as C use stack space for variables, and the collection of variables allocated for a subroutine is known as a stack frame. While the computer will set aside the appropriate amount of space for the stack frame, it usually does so simply by adjusting the value of the stack pointer, and does not set the memory itself to any new state. Therefore whatever contents of that memory at the time will appear as initial values of the variables which occupy those addresses.
01-28-2011, 11:22 PM #3
EliteMossy
TheDigitalBoard.com
Originally posted by IHProdigy View Post
Make sure that your variable isn't in a scope, and it's global.

example

    
int MyNumber;

int main()
{
//I can read MyNumber
}
void OtherFunction()
{
//and so can I
}


This might be the problem
    
int main()
{
int MyNumber;
//I can read MyNumber
}
void OtherFunction()
{
//Wtf is MyNumber?
}


Also, make sure that you have given notifyData some value.

Taken straight from wikipedia:
In computing, an uninitialized variable is a variable that is declared but is not set to a definite known value before it is used. It will have some value, but not a predictable one. As such it is a programming error and a common source of bugs in software.
A common assumption made by novice programmers is that variables are set to a known value, such as zero, when they are declared. While this is true for many languages, it is not true for all of them, and so the potential for error is there. Languages such as C use stack space for variables, and the collection of variables allocated for a subroutine is known as a stack frame. While the computer will set aside the appropriate amount of space for the stack frame, it usually does so simply by adjusting the value of the stack pointer, and does not set the memory itself to any new state. Therefore whatever contents of that memory at the time will appear as initial values of the variables which occupy those addresses.



Errr. WHAT THE ****! GTFO.

If you are going to help, then ****ing help not paste useless stuff which is not relevant to the problem

    
notifyData = spawnstruct(); //Add that
notifyData.titleText = "You are level 70 now!";
notifyData.notifyText = "Leave and Prestige.";
notifyData.notifyText2 = "Then Join back.";
notifyData.glowColor = (0.5, 0.0, 0.;
notifyData.sound = "mp_level_up";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );

The following user thanked EliteMossy for this useful post:

Fire.
01-28-2011, 11:32 PM #4
dogyplop
Do a barrel roll!
Originally posted by TheEliteMossy View Post
Errr. WHAT THE ****! GTFO.

If you are going to help, then ****ing help not paste useless stuff which is not relevant to the problem

    
notifyData = spawnstruct(); //Add that
notifyData.titleText = "You are level 70 now!";
notifyData.notifyText = "Leave and Prestige.";
notifyData.notifyText2 = "Then Join back.";
notifyData.glowColor = (0.5, 0.0, 0.;
notifyData.sound = "mp_level_up";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );


Thanks man ur da boss
01-28-2011, 11:39 PM #5
EliteMossy
TheDigitalBoard.com
Originally posted by dogyplop View Post
Thanks man ur da boss


well hit thanks then ? :P

The following 2 users say thank you to EliteMossy for this useful post:

dogyplop, Fire.
01-28-2011, 11:43 PM #6
Fire.
Im a fed.
Originally posted by TheEliteMossy View Post
well hit thanks then ? :P


I did it for you:p Happy Hey have you decided on your idea for the new fun game mode?
01-28-2011, 11:47 PM #7
dogyplop
Do a barrel roll!
Originally posted by TheEliteMossy View Post
well hit thanks then ? :P


i was thinkin bout tryin 2 make my own gamemode but i need 2 no how 2 give the 2 teams different (perks,weapons,equipment,speed ect)
i thought u wud be 1 of the only ppl to help plz reply , thx
01-29-2011, 05:37 AM #8
FrOoTLoOpZ
Got MILK?
Originally posted by dogyplop View Post
i was thinkin bout tryin 2 make my own gamemode but i need 2 no how 2 give the 2 teams different (perks,weapons,equipment,speed ect)
i thought u wud be 1 of the only ppl to help plz reply , thx


for the good team (self.team == "allies")
for enemys (self.team == "axis")

The following user thanked FrOoTLoOpZ for this useful post:

dogyplop

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo