Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Delayed on storing returned values to variable

$
0
0
So I was planning to create a new include but I have been experiencing issues.

PHP Code:

stock CreateGroup(name[], tag[])
{
    
groupID++;
    
GroupInfo[groupID][groupTaken] = true;
    
format(GroupInfo[groupID][groupTag], 5tag);
    
format(GroupInfo[groupID][groupName], 32name);
    return 
groupIDCallLocalFunction("OnCreateGroup""dss"groupIDnametag);


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

PHP Code:

test CreateGroup("Comb""MICA");
test2 CreateGroup("Slut""CLUB");
printf("%d - test variable"test);
printf("%d - test2 variable"test2); 

The test & test2 variable returns 1 and 2 but when you run them up over OnCreateGroup it's 0 and 1

PHP Code:

public OnCreateGroup(groupidname[], tag[])
{
    if(
groupid == test)
    {
        print(
"test");
    }
    if(
groupid == test2)
    {
        print(
"slut doval");
    }
    return 
1;


None of those "test" and "slut doval" are printed once the CreateGroup was called.

Any idea on how to solve this out?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>