Need help with my function please. -
SaMuRy - 14.09.2018
https://pastebin.com/BMSqpYCD - Get in --- PB
The help request is explained there.
Thank you guys
Re: Need help with my function please. -
AmirSavand - 14.09.2018
Show the code form line 17976 in your gamemode.
Re: Need help with my function please. -
Undef1ned - 14.09.2018
PHP код:
function PWarHighCheck(playerid)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
if(pos[2] < 46.1413 && PWarBattle[playerid][InPWar])
{
PLozzerPWar(playerid);
return 1;
}
if(PWarBattle[playerid][InPWar]) SetTimerEx("PWarHighCheck", 1000, false, "d", playerid);
return 1;
}
Re: Need help with my function please. -
AmirSavand - 15.09.2018
Quote:
Originally Posted by Undef1ned
PHP код:
function PWarHighCheck(playerid)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
if(pos[2] < 46.1413 && PWarBattle[playerid][InPWar])
{
PLozzerPWar(playerid);
return 1;
}
if(PWarBattle[playerid][InPWar]) SetTimerEx("PWarHighCheck", 1000, false, "d", playerid);
return 1;
}
|
You should write stock instead of function, this is not JavaScript.
Anyway we talked in private chat and the issue is not that simple, it's almost impossible to be solved by someone else.
Re: Need help with my function please. -
Undef1ned - 15.09.2018
What do you mean by saying that this is not "JavaScript", do you know how to define "function" or at least some time in your life have you used it? If you think you can not solve a problem or at least look for a solution, then this not for you.
I do not see anything complicated in that code
Re: Need help with my function please. -
AmirSavand - 15.09.2018
Quote:
Originally Posted by Undef1ned
What do you mean by saying that this is not "JavaScript"[/COLOR][/SIZE]
|
You do not declare functions in pawn via function keyword!
Quote:
Originally Posted by Undef1ned
do you know how to define "function" or at least some time in your life have you used it?[/COLOR][/SIZE]
|
What the hell are you talking about.
Quote:
Originally Posted by Undef1ned
If you think you can not solve a problem or at least look for a solution, then this not for you.[/COLOR][/SIZE]
|
We did discuss the issue and I did try to solve it but the error line in the gamemode I received had no issue and the indention was horrible, there could be a missing "{" or "}".
Re: Need help with my function please. -
Banditul18 - 15.09.2018
Quote:
Originally Posted by AmirSavand
You do not declare functions in pawn via function keyword!
|
Actually people are lazy, the function keyword in this case its a macro which foward a function and make it public
Its like writeing
foward Example();
public Example()
But you just write
function Example()
Re: Need help with my function please. -
UFF - 15.09.2018
Quote:
Originally Posted by AmirSavand
You should write stock instead of function, this is not JavaScript.
Anyway we talked in private chat and the issue is not that simple, it's almost impossible to be solved by someone else.
|
function can be defined as
Код:
#define function%0(%1) forward %0(%1); public %0(%1)
To find the missing brackets, you can use this tool.
https://sampforum.blast.hk/showthread.php?tid=291018
Re: Need help with my function please. -
AmirSavand - 15.09.2018
Quote:
Originally Posted by UFF
|
I know how they can be defined.
@SaMuRy use the tool he shared and see if you can fix your issue.
Re: Need help with my function please. -
Undef1ned - 15.09.2018
Quote:
Originally Posted by AmirSavand
I know how they can be defined.
@SaMuRy use the tool he shared and see if you can fix your issue.
|
So, why the hell are you saying we're not in javascript?
LMAO