SA-MP Forums Archive
can't shear regular variebles with CallRemoteFunction - 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: can't shear regular variebles with CallRemoteFunction (/showthread.php?tid=408233)



can't shear regular variebles with CallRemoteFunction - ancezas - 17.01.2013

hi, i have this script:

pawn Код:
CallRemoteFunction("GetPatirtis", "i", zInfo[ playerid ][ Patirtis ]);
    CallRemoteFunction("GetPinigai", "i", zInfo[ playerid ][ Pinigai ]);
and in .inc have this one:
pawn Код:
forward GetMoney(playerid);
public GetMoney(playerid)
{
    return zInfo[playerid][Pinigai];
}
forward GetPatirtis(playerid);
public GetPatirtis(playerid)
{
    return zInfo[playerid][Patirtis];
}
have these Errors on include:

Quote:

error 017: undefined symbol "zInfo"
error 017: undefined symbol "zInfo"
error 017: undefined symbol "zInfo"
error 017: undefined symbol "zInfo"
error 017: undefined symbol "zInfo"
error 017: undefined symbol "zInfo"

how do i shear that?


Re: can't shear regular variebles with CallRemoteFunction - Patrick - 17.01.2013

do you have variables? like
pawn Код:
new zInfo[MAX_PLAYERS];



Re: can't shear regular variebles with CallRemoteFunction - IPrototypeI - 17.01.2013

Quote:
Originally Posted by ancezas
Посмотреть сообщение
hi, i have this script:

pawn Код:
CallRemoteFunction("GetPatirtis", "i", zInfo[ playerid ][ Patirtis ]);
    CallRemoteFunction("GetPinigai", "i", zInfo[ playerid ][ Pinigai ]);
and in .inc have this one:
pawn Код:
forward GetMoney(playerid);
public GetMoney(playerid)
{
    return zInfo[playerid][Pinigai];
}
forward GetPatirtis(playerid);
public GetPatirtis(playerid)
{
    return zInfo[playerid][Patirtis];
}
have these Errors on include:



how do i shear that?
Thats not possibel because you can call every Function but not the values.

you can use an include it put all values there or you can use PVars , or you can hook function in your gamemode
which change the values of your array


Re: can't shear regular variebles with CallRemoteFunction - ancezas - 17.01.2013

yes, i don't have problem with it in filterscript whear is all varaibles, but when i try to shear it IDK how to use CallRemoteFunction corectly


Re: can't shear regular variebles with CallRemoteFunction - ancezas - 17.01.2013

Quote:
Originally Posted by IPrototypeI
Посмотреть сообщение
Thats not possibel because you can call every Function but not the values.

you can use an include it put all values there or you can use PVars , or you can hook function in your gamemode
which change the values of your array
with PVars everything with be okey exept saving, i need to call OnPlayerDisconnect somehow earlyer the OnGameModeExit


Re: can't shear regular variebles with CallRemoteFunction - SuperViper - 17.01.2013

pawn Код:
GetMoney(playerid)
{
    return CallRemoteFunction("remote_money", "i", playerid);
}

GetPatirtis(playerid)
{
    return CallRemoteFunction("remote_patirtis", "i", playerid);
}
Then in your main script:

pawn Код:
forward public remote_money(playerid);
forward public remote_patirtis(playerid);

public remote_money(playerid)
{
    return zInfo[playerid][Pinigai];
}

public remote_patirtis(playerid)
{
    return zInfo[playerid][Patirtis];
}