Invalid function
#1

Well, I've got this problem, I do not know how to fix it :c I'll rep up the guy that manages to help me

PHP код:
C:\Users\MARKO\Desktop\Learning\gamemodes\ARP.pwn(491) : error 008must be a constant expressionassumed zero
C
:\Users\MARKO\Desktop\Learning\gamemodes\ARP.pwn(493) : warning 209: function "cmd_opendgates" should return a value
C
:\Users\MARKO\Desktop\Learning\gamemodes\ARP.pwn(494) : error 010invalid function or declaration
C
:\Users\MARKO\Desktop\Learning\gamemodes\ARP.pwn(39) : warning 204symbol is assigned a value that is never used"dg"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

The dg is never used, that's okay I'm not planning on using it just yet.
And this is the script:
PHP код:
CMD:opendgates(playeridparams[])
{
     if(!
IsPlayerInRangeOfPoint(playerid,5,2517.153812345.7102111.21650)) return SendClientMessage(playeridCOLOR_RED"You're not near the crack den.");
     else if
     {
    -> 
error line MoveObject(dm,2517.153812345.710215,1.5,5);
     
SendClientMessage(playeridCOLOR_AQUA"{FFFFFF}[DRUG DEALER]{FFFF66}Get in,scrub.");
-> 
error line }
-> 
error line return 1;

Reply
#2

Not sure about this one but "if - else if" construction needs an expression to validate to either true(1) or false(0), hence the error. If you don't require a second "case" just use "if - else" construction.
Reply
#3

<3 removed "if" at "else if" and it fixed it <3
*on Croatian ( because im from Croatia )
Hvala kralju.
Reply
#4

Hey, hey no problem!
Glad it's sorted out (:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)