My Scripting Questions
#1

I've wrotten this in the small scripting questions but nobody answers, so I hope I'll get help when I writte it in here:
Quote:

I don't know where the failure is. I scripted on OnPlayerEnterVehicle:

Код:
if(GetVehicleModel(vehicleid) == 400)
	{
	    if(landstal == false)
	    {
	        landstal = true;
	        SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
	        return 0;
		}
		else return 1;
	}
I scripted landstal as a boolean before:
Код:
new bool:landstal;
It should only one time give score +1; only when entering the vehicle for the first time, but it's giving score on every enter. What did I wrong?

Then, I've made this:
Код:
365:	new score = GetPlayerScore(playerid);
366:	if(score == 10 || =< 10)
367:	{
368:		TextDrawShowForPlayer(playerid, level0);
369:		return 1;
370:	}
371:	if(score => 11 && =< 100)
372:	{
373:	    TextDrawShowForPlayer(playerid, level1);
374:	    return 1;
375:	}
And the compiler says:

Код:
(366) : error 029: invalid expression, assumed zero
(371) : warning 211: possibly unintended assignment
(371) : error 029: invalid expression, assumed zero
(371) : error 029: invalid expression, assumed zero
(371) : error 029: invalid expression, assumed zero
(371) : fatal error 107: too many error messages on one line
It seems like the compiler doesn't like && and ||, but I've got a filterscript where it doesn't give an error, so why here? What did I wrong? Logically, should it work...
Reply


Messages In This Thread
My Scripting Questions - by xZacharias - 18.11.2011, 10:53
Re: My Scripting Questions - by CSSI - 18.11.2011, 10:56
Re: My Scripting Questions - by moadi - 18.11.2011, 10:57
Re: My Scripting Questions - by moadi - 18.11.2011, 11:00
Re: My Scripting Questions - by xZacharias - 18.11.2011, 11:12
Re: My Scripting Questions - by xZacharias - 18.11.2011, 11:33
Re: My Scripting Questions - by xZacharias - 18.11.2011, 19:08

Forum Jump:


Users browsing this thread: 1 Guest(s)