So I was planning to create a new include but I have been experiencing issues.
The problem is, there are delays on storing the returned values to the variable and I have tried the technique above and it still didn't work.
What I basically did is
The test & test2 variable returns 1 and 2 but when you run them up over OnCreateGroup it's 0 and 1
None of those "test" and "slut doval" are printed once the CreateGroup was called.
Any idea on how to solve this out?
PHP Code:
stock CreateGroup(name[], tag[])
{
groupID++;
GroupInfo[groupID][groupTaken] = true;
format(GroupInfo[groupID][groupTag], 5, tag);
format(GroupInfo[groupID][groupName], 32, name);
return groupID, CallLocalFunction("OnCreateGroup", "dss", groupID, name, tag);
}
What I basically did is
PHP Code:
test = CreateGroup("Comb", "MICA");
test2 = CreateGroup("Slut", "CLUB");
printf("%d - test variable", test);
printf("%d - test2 variable", test2);
PHP Code:
public OnCreateGroup(groupid, name[], tag[])
{
if(groupid == test)
{
print("test");
}
if(groupid == test2)
{
print("slut doval");
}
return 1;
}
Any idea on how to solve this out?