Problem whit a Varible - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem whit a Varible (
/showthread.php?tid=112217)
Problem whit a Varible -
basker - 06.12.2009
Hello my Varible code looks like this
InTopOfScript:
OnGameModeInit()
Код:
Enable = true;//This i think does so when i start up the server its enable the Ooc chat
OnPlayerCommandText()
But Still i get those warnings
Код:
C:\Users\Steven\Desktop\Server\gamemodes\Streetlife.pwn(180) : warning 213: tag mismatch
C:\Users\Steven\Desktop\Server\gamemodes\Streetlife.pwn(188) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
anyone knows how i cloud fix the varibles warnings ?
Oh btw
Код:
if(Enable == true)// is line 180
and
Код:
if(Enable == false)// is line 188
Re: Problem whit a Varible -
cloud9 - 06.12.2009
You don't need to define "Enable" again at OnGameModeInit()
Just do
new Enable = 1;
if(Enable == 1){
// whatever you want do it here
return 1;
}
Re: Problem whit a Varible -
DeathOnaStick - 06.12.2009
It says tag-mismatch, because you didnt declare it as boolean (bool = true/false). Just watch the code i added above.
Cheers.
#Edit#: First :P
Re: Problem whit a Varible -
Correlli - 06.12.2009
Quote:
Originally Posted by ZutDenOpFraSlap
|
Your variable is a normal integer, you can't check for true/false unless you set it as bool.
Re: Problem whit a Varible -
basker - 06.12.2009
Oh ok many Thx