SA-MP Forums Archive
Error 010 - 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)
+--- Thread: Error 010 (/showthread.php?tid=361497)



Error 010 - aznpro12345 - 21.07.2012

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


Re: Error 010 - Devilxz97 - 21.07.2012

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


Re: Error 010 - Kindred - 21.07.2012

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


Re: Error 010 - aznpro12345 - 21.07.2012

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


Re: Error 010 - Kindred - 21.07.2012

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


Re: Error 010 - EV007 - 21.07.2012

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.


Re: Error 010 - MadeMan - 21.07.2012

Put the command to OnPlayerCommandText

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