Help With Recording Command - 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: Help With Recording Command (
/showthread.php?tid=258506)
Help With Recording Command -
dowster - 30.05.2011
I can't seem to get the pvars right..
here are the error messages:
E:\Grand Theft Auto\Tinker Server\gamemodes\bradystable.pwn(782) : warning 211: possibly unintended assignment
E:\Grand Theft Auto\Tinker Server\gamemodes\bradystable.pwn(782) : error 022: must be lvalue (non-constant)
E:\Grand Theft Auto\Tinker Server\gamemodes\bradystable.pwn(782) : warning 215: expression has no effect
E:\Grand Theft Auto\Tinker Server\gamemodes\bradystable.pwn(782) : error 001: expected token: ";", but found ")"
E:\Grand Theft Auto\Tinker Server\gamemodes\bradystable.pwn(782) : error 029: invalid expression, assumed zero
E:\Grand Theft Auto\Tinker Server\gamemodes\bradystable.pwn(782) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Code Starts on Line 777
Код:
COMMAND:record(playerid, params[])
{
new name[128];
if (sscanf(params, "s", name))
{
if (GetPVarInt(playerid, "recording") = 1)
{
StopRecordingPlayerData();
SendClientMessage(playerid, COLOR_RED, "Recording Stopped");
}
else SendClientMessage(playerid, COLOR_RED, "Usage: /record [Name of Recording]");
}
else if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_ONFOOT, name);
SendClientMessage(playerid, COLOR_WHITE, "Recording: /record to stop");
SendClientMessage(playerid, COLOR_WHITE, "If You Enter A Vehicle, Recording Will Stop!");
SetPVarInt(playerid, "recording", 1);
}
else if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_ONFOOT, name);
SendClientMessage(playerid, COLOR_WHITE, "Recording: /record to stop");
SendClientMessage(playerid, COLOR_WHITE, "If You Leave The Vehicle, Recording Will Stop!");
SetPVarInt(playerid, "recording", 1);
}
return 1;
}
Re: Help With Recording Command -
austin070 - 31.05.2011
pawn Код:
if (GetPVarInt(playerid, "recording") == 1)
See if that fixes it. You need 2 = signs.