SA-MP Forums Archive
Ladmin:L - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Ladmin:L (/showthread.php?tid=275718)



Ladmin:L - Admigo - 10.08.2011

Heey guys,
I am back to pawno u all:P
I have a problem with ladmin. I want to add more in ladmin but if i download ladmin and compile i get errors:S
How can i fix it?

Need help,....:L


Re: Ladmin:L - Norck - 10.08.2011

Show us an errors?


Re: Ladmin:L - [HiC]TheKiller - 10.08.2011

Have you downloaded the most recent sa-mp server? Or do you have the includes it requires?

http://sa-mp.com/download.php

Also, it would be helpful if you told us the errors.


Re: Ladmin:L - Admigo - 10.08.2011

Quote:
Originally Posted by Norck
Посмотреть сообщение
Show us an errors?
C:\Users\Brandon\Desktop\LAdmin4v2\LAdmin4v2\filte rscripts\ladmin4v2.pwn(1084) : error 017: undefined symbol "strtok"
C:\Users\Brandon\Desktop\LAdmin4v2\LAdmin4v2\filte rscripts\ladmin4v2.pwn(1084) : error 033: array must be indexed (variable "tmp3")
C:\Users\Brandon\Desktop\LAdmin4v2\LAdmin4v2\filte rscripts\ladmin4v2.pwn(1084) : warning 203: symbol is never used: "Index"


Re: Ladmin:L - Admigo - 10.08.2011

Wtf is this error:P?


Re: Ladmin:L - grand.Theft.Otto - 10.08.2011

I use a majorly edited version of LAdmin that I edited myself, but for those errors, can we see the lines ?


Re: Ladmin:L - Admigo - 10.08.2011

Quote:
Originally Posted by grand.Theft.Otto
Посмотреть сообщение
I use a majorly edited version of LAdmin that I edited myself, but for those errors, can we see the lines ?
here are the lines:
Код:
new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index), tmp3 = strtok(params,Index);



Re: Ladmin:L - grand.Theft.Otto - 10.08.2011

You should have this stock in the script:

pawn Код:
stock strtok(const string[], &idx)
{
    new length = strlen(string);
    while ((idx < length) && (string[idx] <= ' '))
    {
        idx++;
    }
    new offset = idx;
    new result[128];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
        result[idx - offset] = string[idx];
        idx++;
    }
    result[idx - offset] = EOS;
    return result;
}
Look for it, if it is not there or commented out, uncomment it or add the above one to the bottom of LAdmin.

I have no idea for the error "array must be indexed: (variable tmp3)"


Re: Ladmin:L - Admigo - 10.08.2011

Quote:
Originally Posted by grand.Theft.Otto
Посмотреть сообщение
You should have this stock in the script:

pawn Код:
stock strtok(const string[], &idx)
{
    new length = strlen(string);
    while ((idx < length) && (string[idx] <= ' '))
    {
        idx++;
    }
    new offset = idx;
    new result[128];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
        result[idx - offset] = string[idx];
        idx++;
    }
    result[idx - offset] = EOS;
    return result;
}
Look for it, if it is not there or commented out, uncomment it or add the above one to the bottom of LAdmin.

I have no idea for the error "array must be indexed: (variable tmp3)"
PMG thanks dude!worked 100%! Rep for u+