Need help with my function please.
#1

https://pastebin.com/BMSqpYCD - Get in --- PB
The help request is explained there.

Thank you guys
Reply
#2

Show the code form line 17976 in your gamemode.
Reply
#3

PHP код:
function PWarHighCheck(playerid)
{
    new 
Float:pos[3];
    
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
    
    if(
pos[2] < 46.1413 && PWarBattle[playerid][InPWar])
    {
        
PLozzerPWar(playerid);
        return 
1;
    }
    
    if(
PWarBattle[playerid][InPWar]) SetTimerEx("PWarHighCheck"1000false"d"playerid);
    return 
1;

Reply
#4

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
PHP код:
function PWarHighCheck(playerid)
{
    new 
Float:pos[3];
    
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
    
    if(
pos[2] < 46.1413 && PWarBattle[playerid][InPWar])
    {
        
PLozzerPWar(playerid);
        return 
1;
    }
    
    if(
PWarBattle[playerid][InPWar]) SetTimerEx("PWarHighCheck"1000false"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.
Reply
#5

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
Reply
#6

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 "}".
Reply
#7

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()
Reply
#8

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
Reply
#9

Quote:
Originally Posted by UFF
Посмотреть сообщение
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
I know how they can be defined.

@SaMuRy use the tool he shared and see if you can fix your issue.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)