can't shear regular variebles with CallRemoteFunction
#1

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?
Reply
#2

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

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

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

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

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];
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)