Help me !! -
Reinix - 27.09.2009
i was making a elevator who works with Timers
#include <a_samp>
new move;
new mainigais;
public OnGameModeInit()
{
mainigais = 0;
move = CreateObject(8040, -465.149445, 2084.196045, 60.769142, 0.0000, 0.0000, 318.6701);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/aktivizet", cmdtext, true, 6) == 0) {
if(mainigais == 0) {
SendClientMessage(playerid, 0x33AA33AA,"Tu aktivizeji liftu.";
SetTimer("move", 10000, true);
public move ()
MoveObject(move, -465.262878, 2084.308838, 128.973648, 3); //augshaa
SetTimer("move2", 60000, true);
}
public move2 ()
MoveObject(move, -465.149445, 2084.196045, 60.769142, 3); //lejaa
}
return 1;
}
return 0;
}
Cocuments and SettingsGundarsDesktopvisadi ''mesli''serversfilterscriptsNiks.pwn(22) : warning 217: loose indentation
Cocuments and SettingsGundarsDesktopvisadi ''mesli''serversfilterscriptsNiks.pwn(22) : error 029: invalid expression, assumed zero
Cocuments and SettingsGundarsDesktopvisadi ''mesli''serversfilterscriptsNiks.pwn(22) : error 012: invalid function call, not a valid address
Cocuments and SettingsGundarsDesktopvisadi ''mesli''serversfilterscriptsNiks.pwn(22) : error 029: invalid expression, assumed zero
Cocuments and SettingsGundarsDesktopvisadi ''mesli''serversfilterscriptsNiks.pwn(22) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Help me plzzz
Re: Help me !! -
[XST]O_x - 27.09.2009
Which is line 22?show it plz
Re: Help me !! -
Reinix - 27.09.2009
Quote:
Originally Posted by 3xPloSioNxXx
Which is line 22?show it plz
|
public move()
Re: Help me !! -
Correlli - 27.09.2009
Learn some basics. You can't have function inside other function (which is OnPlayerCommandText in your case).
Re: Help me !! -
Reinix - 27.09.2009
Quote:
Originally Posted by Don Correlli
Learn some basics. You can't have function inside other function (which is OnPlayerCommandText in your case).
|
i dont know how to edit it.. plzz edit
so i can play with it.. plzz
Re: Help me !! -
MadeMan - 27.09.2009
pawn Код:
#include <a_samp>
new move;
new mainigais;
public OnGameModeInit()
{
mainigais = 0;
move = CreateObject(8040, -465.149445, 2084.196045, 60.769142, 0.0000, 0.0000, 318.6701);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/aktivizet", cmdtext, true) == 0)
{
if(mainigais == 0)
{
SendClientMessage(playerid, 0x33AA33AA,"Tu aktivizeji liftu.";
SetTimer("move", 10000, true);
}
return 1;
}
return 0;
}
public move ()
{
MoveObject(move, -465.262878, 2084.308838, 128.973648, 3); //augshaa
SetTimer("move2", 60000, true);
}
public move2 ()
{
MoveObject(move, -465.149445, 2084.196045, 60.769142, 3); //lejaa
}
Re: Help me !! -
Correlli - 27.09.2009
You forgot to forward the functions:
pawn Код:
forward move();
forward move2();
Re: Help me !! -
Reinix - 27.09.2009
Quote:
Originally Posted by MadeMan
pawn Код:
#include <a_samp> new move; new mainigais;
public OnGameModeInit() { mainigais = 0; move = CreateObject(8040, -465.149445, 2084.196045, 60.769142, 0.0000, 0.0000, 318.6701); return 1; }
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/aktivizet", cmdtext, true) == 0) { if(mainigais == 0) { SendClientMessage(playerid, 0x33AA33AA,"Tu aktivizeji liftu."[b])[/b]; SetTimer("move", 10000, true); } return 1; } return 0; }
public move () { MoveObject(move, -465.262878, 2084.308838, 128.973648, 3); //augshaa SetTimer("move3", 60000, true); }
public move[b]3[/b] () { MoveObject(move, -465.149445, 2084.196045, 60.769142, 3); //lejaa }
|
i do 2 things and i got only 2 warnngs
thanks guys
Re: Help me !! -
Reinix - 27.09.2009
when elevator moves up.. next timer ends.. object moves just liitle bit down and immediately moves up to up cords.. whats wrong now ?!