SA-MP Forums Archive
need help with send values from FS TO GM - 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: need help with send values from FS TO GM (/showthread.php?tid=445445)



need help with send values from FS TO GM - mineralo - 21.06.2013

well, I need to transfer player's stuff from FS to GM but I get error, what's wrong?
FS CODE
pawn Code:
#include <a_samp>
enum pInfo
{
    shit
}
new PlayerInfo[MAX_PLAYERS][pInfo];

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Test FS");
    print("--------------------------------------\n");
    PlayerInfo[0][shit]=243;
    CallRemoteFunction("callMe","ddd",0,shit,PlayerInfo[0][shit]);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
GM Code
pawn Code:
#include <a_samp>

enum pInfo
{
    shit
}
new PlayerInfo[MAX_PLAYERS][pInfo];

main()
{
    print("\n----------------------------------");
    print(" test gm");
    print("----------------------------------\n");
}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

forward callMe(playerid,key,date);
public callMe(playerid,key,date)
{
    PlayerInfo[playerid][key]=date;//line 36
    printf("shit = %d",PlayerInfo[playerid][key]); //line 37
    return 1;
}
error code
Code:
tst.pwn(36) : warning 213: tag mismatch
tst.pwn(37) : warning 213: tag mismatch
I just testing only with one id


Re: need help with send values from FS TO GM - Smokkr - 21.06.2013

Wrong try to solve it.


Re: need help with send values from FS TO GM - mineralo - 21.06.2013

Quote:
Originally Posted by ******
View Post
You realise that you've removed the most vital information to diagnosing the problem right?
what you mean?


Re: need help with send values from FS TO GM - mineralo - 21.06.2013

I'm tring at moment just with one variable and after will try to use more, and if will be alright will use in gm


Re: need help with send values from FS TO GM - mineralo - 21.06.2013

I'm sending from fs the enum to gm
pawn Code:
CallRemoteFunction("callMe","ddd",0,shit,PlayerInfo[0][shit]);
forward callMe(playerid,key,date);
public callMe(playerid,key,date)
{
    PlayerInfo[playerid][key]=date;//line 36
    printf("shit = %d",PlayerInfo[playerid][key]); //line 37
    return 1;
}
I'm thinking the enum is not simple variable, could be other type like bool,float,etc


Re: need help with send values from FS TO GM - mineralo - 21.06.2013

thanks, works