PDA

View Full Version : [HELP] How can I adapt this filterscript inside a gamemode?


Shawness
05/09/2018, 01:46 AM
Hello, this is the filterscript I'm trying to put inside my gamemode, but it gives me that error:
error 017: undefined symbol "playerid"

And when I move the following section to OnPlayerConnect...
new
Text: Registro[12],
Text: Dicas[15],
Text: Info[15],
PlayerText: PlayerRegistro[playerid][MAX_PLAYERS][6];

It gives me the following errors:
: error 017: undefined symbol "Dicas"
: warning 215: expression has no effect
: error 001: expected token: ";", but found "]"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line

I hope you can help me.

iHollyZinhO
05/09/2018, 02:04 AM
Can you post a link to this filterscript? It's the best way to understand what is necessary to do.

Shawness
05/09/2018, 02:06 AM
Can you post a link to this filterscript? It's the best way to understand what is necessary to do.

Sorry, I forgot that, here it is!

https://pastebin.com/5MU0nCMk

Pottus
05/09/2018, 02:08 AM
All you need to do is hook all the callbacks and make it an include.

iHollyZinhO
05/09/2018, 02:13 AM
In this filterscript someone used Ctrl + H with PlayerRegistro and a wrong variable (playerid) appeared as an index.

I change somethings to fix this bug: https://pastebin.com/atjdM6Es

Shawness
05/09/2018, 02:17 AM
All you need to do is hook all the callbacks and make it an include.
Thank you!

Vi que você é de São Paulo, então vou escrever em português mesmo kk.

Então, nesse filterscript foi dado Ctrl + H no TextDraw PlayerRegistro e acabou surgindo vários PlayerRegistro[playerid], sendo que playerid não estava declarado naquele escopo.

Eu fiz as devidas correções: https://pastebin.com/atjdM6Es

Obrigado! Escrevi em inglês porque voltei a programar agora e não sei como está a comunidade brasileira no SA-MP hoje em dia kkkkk

REP + BOTH

Pottus
05/09/2018, 02:20 AM
Yeah I should add after hooking callbacks the next step is getting it to work with your gamemode but typically most fs's compiled into a gamemode when configured correctly.