Error 010
#1

i tried on making a gate with /gate at LSPD and try and finally create a moving gate, but it just wont work it keeps poping up the stupid Errors.

Код:
C:\Users\Unknown\Desktop\My script fun\gamemodes\grandlarc.pwn(532) : error 010: invalid function or declaration
C:\Users\Unknown\Desktop\My script fun\gamemodes\grandlarc.pwn(537) : error 010: invalid function or declaration
Код:
Line 532: if(strcmp(cmdtext,"/gate",true)== 0)
{
	SetObjectPos(LSPDGate,CreateDynamicObject(980,1544.69995117,-1636.40002441,15.19999981);
	SetObjectRot(LSPDGate,0, 0, 90);
	SetTimer("InitPos",3000,false);
	Ignore this. it's just where the problem is pointed outLine 537: return 1;
}

public InitPos()
{
	SetObjectPos(LSPDGate, 1544.69995117,-1627.50000000,15.19999981);
	SetObjectRot(LSPDGate,0, 0, 90);
}
Please help, i will rep
Reply
#2

pawn Код:
public InitPos()
{
    SetObjectPos(LSPDGate, 1544.69995117,-1627.50000000,15.19999981);
    SetObjectRot(LSPDGate,0, 0, 90);
    return 1;
}
try this
Reply
#3

pawn Код:
if(strcmp(cmdtext,"/gate",true)== 0)
{
    SetObjectPos(LSPDGate,980,1544.69995117,-1636.40002441,15.19999981);
    SetObjectRot(LSPDGate,0, 0, 90);
    SetTimer("InitPos",3000,false);
    return 1;
}
Even if you didn't know how to script, this is pretty OBVIOUS
Reply
#4

Quote:
Originally Posted by Kindred
Посмотреть сообщение
pawn Код:
if(strcmp(cmdtext,"/gate",true)== 0)
{
    SetObjectPos(LSPDGate,980,1544.69995117,-1636.40002441,15.19999981);
    SetObjectRot(LSPDGate,0, 0, 90);
    SetTimer("InitPos",3000,false);
    return 1;
}
Even if you didn't know how to script, this is pretty OBVIOUS
It didn't work Copied and pasted, nothing happened still the same error
Reply
#5

Nevermind then, switch it back to your old code. Show us some lines before it, idk.
Reply
#6

SetObjectPos(LSPDGate,CreateDynamicObject(980,1544 .69995117,-1636.40002441,15.19999981);

This is the problem, you put a function in a function, you forgot -> ) in the end also.
Reply
#7

Put the command to OnPlayerCommandText

https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)