SA-MP Forums Archive
[HELP]Functions from Gamemode to FilterScript? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]Functions from Gamemode to FilterScript? (/showthread.php?tid=79361)



[HELP]Functions from Gamemode to FilterScript? - Ace_Menace - 28.05.2009

Hello.

-
I am using a game mode which replaces the money functions to reduce Hacking possibilities, (something I would like to keep).

Now my issue is that when I grab a filterscript, lets say.."Car Ownership".

It is going to use the more common functions. (GetPlayerMoney, etc.)

But my gamemode uses (GetPlayerCash, etc.)
-

So how can I make these filterscripts the same format without getting errors n Compile.


Re: [HELP]Functions from Gamemode to FilterScript? - BP13 - 28.05.2009

include the same anti cheat then also change that to GetPlayerCash


Re: [HELP]Functions from Gamemode to FilterScript? - Ace_Menace - 28.05.2009

So i should just put the GetPlayerCash Definition into the new Filterscript?


Re: [HELP]Functions from Gamemode to FilterScript? - BP13 - 28.05.2009

yes give it a try and see what happens


Re: [HELP]Functions from Gamemode to FilterScript? - Ace_Menace - 28.05.2009

Okay I did this. Of course this got rid of the errors, but now there is a whole new list of errors.

Код:
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(52) : error 017: undefined symbol "pInfo"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(52) : error 009: invalid array size (negative, zero or out of bounds)
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(56) : error 017: undefined symbol "pCash"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(57) : error 017: undefined symbol "ResetMoneyBar"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(58) : error 017: undefined symbol "UpdateMoneyBar"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(59) : error 017: undefined symbol "pCash"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(77) : error 017: undefined symbol "pCash"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(493) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(493) : error 033: array must be indexed (variable "cmd")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(533) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(533) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(536) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(536) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(539) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(539) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(542) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(542) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(602) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(602) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(492) : warning 203: symbol is never used: "idx"



Re: [HELP]Functions from Gamemode to FilterScript? - BP13 - 28.05.2009

post the lines too


Re: [HELP]Functions from Gamemode to FilterScript? - Ace_Menace - 28.05.2009

Here are the current errors, I just eliminated that mess.

Код:
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(54) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(54) : warning 215: expression has no effect
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(54) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(54) : error 029: invalid expression, assumed zero
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(54) : fatal error 107: too many error messages on one line
Line 54:
Код:
PlayerInfo[playerid][pCash] += money;



Re: [HELP]Functions from Gamemode to FilterScript? - Ace_Menace - 28.05.2009

And when I try to Add in the PlayerInfo Definitions.

Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
Код:
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(52) : error 017: undefined symbol "pInfo"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(52) : error 009: invalid array size (negative, zero or out of bounds)
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(56) : error 017: undefined symbol "pCash"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(57) : error 017: undefined symbol "ResetMoneyBar"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(58) : error 017: undefined symbol "UpdateMoneyBar"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(59) : error 017: undefined symbol "pCash"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(77) : error 017: undefined symbol "pCash"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(493) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(493) : error 033: array must be indexed (variable "cmd")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(533) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(533) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(536) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(536) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(539) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(539) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(542) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(542) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(602) : error 017: undefined symbol "strtok"
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(602) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\HP_Administrator\Desktop\bfxUDx2.pwn(492) : warning 203: symbol is never used: "idx"
If you notice it's that same mess as above..


Re: [HELP]Functions from Gamemode to FilterScript? - BP13 - 28.05.2009

are you missing a .inc file?


Re: [HELP]Functions from Gamemode to FilterScript? - Nero_3D - 28.05.2009

Use CallRemoteFunction => Click

and with an easy define it looks like normal
pawn Код:
#define GetPlayerCash(%1) CallRemoteFunction("GetPlayerCash", "d", %1)
Note: The function need to be a public (all information can be founded in the wiki, link in first line)