SA-MP Forums Archive
Define - 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: Define (/showthread.php?tid=529611)



Define - ZachKnoxx - 03.08.2014

I get these errors:
Код:
C:\Users\Zachary.Zach-HP.000\Desktop\Prison Shop.pwn(350) : error 029: invalid expression, assumed zero
C:\Users\Zachary.Zach-HP.000\Desktop\Prison Shop.pwn(350) : error 017: undefined symbol "RPN"
C:\Users\Zachary.Zach-HP.000\Desktop\Prison Shop.pwn(350) : fatal error 107: too many error messages on one line
With these codes:
Код:
stock RPN(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}
What am I doing wrong? Did I forget to define something?


Re: Define - ViniBorn - 03.08.2014

What is the line 350?


Re: Define - ZachKnoxx - 03.08.2014

stock RPN(playerid)


Re: Define - PawnOX - 03.08.2014

Make sure you defined it

Код:
#define RPN[MAX_PLAYERS]



Re: Define - ZachKnoxx - 03.08.2014

Quote:
Originally Posted by PawnOX
Посмотреть сообщение
Make sure you defined it

Код:
#define RPN[MAX_PLAYERS]
Already did.


Re: Define - ViniBorn - 03.08.2014

How are you using the RPN function?

It has 0 errors...


Re: Define - mirou123 - 03.08.2014

Make sure you close the brackets of the function right before it


Re: Define - Beckett - 03.08.2014

Quote:
Originally Posted by PawnOX
Посмотреть сообщение
Make sure you defined it

Код:
#define RPN[MAX_PLAYERS]
Wrong, don't define it remove it, this guy literally have no idea what he's talking about.

I've compiled your code myself it works fine, remove the #define RPN[MAX_PLAYERS] and all is good.


Re: Define - ZachKnoxx - 03.08.2014

Cancel that, I fixed it just by fucking around with stuff.