hmm...whats wrong with it...

Forum Archive - from http://theuniversal.net
Locked
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

hmm...whats wrong with it...

Post by zaroba »

Code: Select all

Event( "OSDSelect", "lotto:check" )
	{
	If ($playervar20 > $gservervar20)
		{
		*msg %player% The lotto numbers have not yet been drawn
		}
	else if ($playervar20 = $gservervar20)
		{
		If ($playervar22=1)
			{
			$playervar22=0
			}
		Else If ($playervar26=1)
			{
			$playervar26=0
			}
		Else If ($playervar30=1)
			{
			$playervar30=0
			}
		Else If ($playervar34=1)
			{
			$playervar34=0
			}
		Else If ($playervar38=1)
			{
			$playervar38=0
			}
		Else
			{
			*msg %player% no more tickets to check
			}
		}
	else if ($playervar20 = 0)
		{
		*msg %player% You havn't bought any lottery tickets!
		}
	else 
		{
		*msg %player% sorry, your tickets for lottery number $playervar20 have expired, the current lottery number is $gservervar20
		*msg %player% if you wish to check old tickets, please contact zaroba.
		}
	}
before the script is run, playervar20 = 5, gservervar20 = 4
playervars 22, 26, 30, 34, and 38 = 1

the problem is, when the script is run, it posts the message for playervar20 being bigger then gservervar20, then playervars 30, 34, and 38 get reset to zero
despite the line telling it to only run if playervar20 is the same as gservervar20
[/code]

Image
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

removed the else if ($playervar20 = 0) part and now its working fine.
no clue how that would have effected it though
Locked