8 Errors
#1

can somone help me fix 8 errors with team viewer
Код:
error 017: undefined symbol "ret_memcpy"
warning 219: local variable "TimeStamp" shadows a variable at a preceding level
warning 209: function "Streamer_OnPlayerDisconnect" should return a value
error 010: invalid function or declaration
error 021: symbol already defined: "SetPlayerVirtualWorld"
error 054: unmatched closing brace ("}")
error 010: invalid function or declaration
error 010: invalid function or declaration
error 010: invalid function or declaration
error 017: undefined symbol "isNumeric"
Reply
#2

the errors are saying you have an unclosed } and you have symbols that aren't defined. check your script again or tell me your skype and i will help you.
Reply
#3

He doesn't answer my PM can someone else help me ?
Reply
#4

You need to define it first before you're going to use it!
pawn Код:
// error 017: undefined symbol "ret_memcpy"
ret_memcpy(source[],index=0,numbytes)
{
    new tmp[MAX_STRING];
    new i=0;
    tmp[0]=0;
    if (index>=strlen(source)) return tmp;
    if (numbytes+index>=strlen(source)) numbytes=strlen(source)-index;
    if (numbytes<=0) return tmp;
    for (i=index;i<numbytes+index;i++) {
        tmp[i-index]=source[i];
        if (source[i]==0) return tmp;
    }
    tmp[numbytes]=0;
    return tmp;
}
You define it at the top of the callback and you did again somewhere inside of it, so it gives that warning, just goto the line and delete this line
pawn Код:
// warning 219: local variable "TimeStamp" shadows a variable at a preceding level
new TimeStamp;
This callback should return a value, although it doesn't. just goto that callback and add
pawn Код:
// warning 209: function "Streamer_OnPlayerDisconnect" should return a value
//public your_callback_here
{
    // code;
    return 1; // This is what you should return!
}
It's already defined in an include file and you're using an include that it defines it again. Go to the include that it gives the error and just delete it.
pawn Код:
// error 021: symbol already defined: "SetPlayerVirtualWorld"
You used something that it needs to open a bracket; write some part of code; close a bracket, but you did only the second and the third. You missed to open a bracket.
pawn Код:
// error 054: unmatched closing brace ("}")

// An example
if(x == 1) // there's missing a bracket at the beginning
    print("something")
}
You need to define it as well, as the first one of your errors.
pawn Код:
// error 017: undefined symbol "isNumeric"
IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        if (string[i] > '9' || string[i] < '0') return 0;
    }
    return 1;
}
That's all I can do without codes/lines and more details at your errors. I am not if they come from your gamemode or an include file, next time be more specific. You can now fix your problem!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)