01.09.2010, 04:31
(
Последний раз редактировалось Hal; 01.09.2010 в 04:42.
)
Im making a /stuck command that sets the TogglePlayerControllable to true (1) . But, i do not want it to be used against the /freeze command. here is my code, but the errors below show on compile.
I want it so if [Frozen] = 1 it doesnt execute the command. But, if not let it continue.
Should i add a
or would not having it, work the same?
Thanks Lots
Код:
C:\...\gamemodes\TimesRP.pwn(12715) : warning 211: possibly unintended assignment C:\...\gamemodes\TimesRP.pwn(12715) : error 036: empty statement C:\...\gamemodes\TimesRP.pwn(12718) : error 029: invalid expression, assumed zero C:\...\gamemodes\TimesRP.pwn(12719) : warning 217: loose indentation C:\...\gamemodes\TimesRP.pwn(12723) : warning 217: loose indentation C:\...\gamemodes\TimesRP.pwn(12725) : warning 209: function "cmd_stuck" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
pawn Код:
command(stuck,playerid, params[]) // Hal Olpae LINE 12710
#pragma unused params
{
if(IsPlayerConnected(playerid))
{
{ // LINE 12715
if ( Player[playerid][Frozen] = 1);
return 1;
}
else
{ // LINE 12720
TogglePlayerControllable(playerid, true);
SendClientMessage( playerid, RED, "You Are Unstuck" );
}
// return 1; I dont think i need this?
} //LINE12725
} //LINE 12726
Should i add a
pawn Код:
if ( Player[playerid][Frozen] = 0); // a second time to make sure they are not frozen?
Thanks Lots