29.10.2008, 13:43
I Make this script:
And i will get errors:
pawn Код:
#include <a_samp>
new zapornice;
new rottimer;
public OnGameModeInit()
{
rottimer = SetTimer("OnPlayerCommandText", 100, 1); // The timer which will go off every millisecond.
zapornice = CreateObject(968,-1572.203613,658.795593,6.918911,0.000000,0.000000,90.000000);//zapornica odprta
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/skok", true)==0)
{
new Float:rotx, Float:roty, Float:rotz; //Floats
SetObjectRot(zapornice, 0, +0.1, 90.0); // Will set the Z rot +0.1 every millisecond
GetObjectRot(zapornice, rotx, roty, rotz)// Checks the pos
if(roty == 90.0) KillTimer(rottimer); //Checks if the z rot is 100.0 and kills the timer if it is.
return 1;
}
return 0;
}
And i will get errors:
Код:
C:\Documents and Settings\Anћe Miklavčič\Desktop\sa mp server\filterscripts\zapornice.pwn(28) : error 029: invalid expression, assumed zero C:\Documents and Settings\Anћe Miklavčič\Desktop\sa mp server\filterscripts\zapornice.pwn(28) : warning 215: expression has no effect C:\Documents and Settings\Anћe Miklavčič\Desktop\sa mp server\filterscripts\zapornice.pwn(28) : warning 215: expression has no effect C:\Documents and Settings\Anћe Miklavčič\Desktop\sa mp server\filterscripts\zapornice.pwn(28) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Anћe Miklavčič\Desktop\sa mp server\filterscripts\zapornice.pwn(28) : error 029: invalid expression, assumed zero C:\Documents and Settings\Anћe Miklavčič\Desktop\sa mp server\filterscripts\zapornice.pwn(28) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.