TSConnector fehler argument type mismatch (argument 4)

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • hey ich habe grade angefangen mit dem Ts3 connector zu arbeiten alledings habe ich grade eine fehler


    C:\Users\Admin\Desktop\ServerKram\EpicRP\gamemodes\epicRoleplay.pwn(7411) : error 035: argument type mismatch (argument 4)Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase1 Error.


    Und das hier ist die Betroffene zeile


    TSC_Connect("serveradmin", "********", "Epic-roleplay.de", "9987","10011");

  • Zahlen als String übergeben? Ich kenne die Funktion nicht, aber das macht eigentlich nicht viel Sinn.
    Guck dir mal die Doku zu der Funktion oder die Include an, Argument 4 ist bestimmt der Port oder sowas und wird als Zahl übergeben.

    PAWNit gratis nutzen?
    Geschenkcode: 2017VQXPKB8V3KA

    Hier könnte Ihre Werbung stehen.

  • Das ist eine Include und ein Plugin also in der Include habe ich jetzt nix gefunden



    /* Teamspeak3 Connector
    * Version 1.2.1
    * made by maddinat0r
    */


    #if defined tsconnector_included
    #endinput
    #endif
    #define tsconnector_included



    enum TSC_CHANNELTYPE
    {
    INVALID,
    TEMPORARY,
    SEMI_PERMANENT,
    PERMANENT
    };


    enum TSC_KICKTYPE
    {
    INVALID,
    CHANNEL,
    SERVER
    };


    enum TSC_CHANNEL_QUERYDATA
    {
    INVALID,
    CHANNEL_TOPIC, //string
    CHANNEL_DESCRIPTION, //string
    CHANNEL_CODEC, //int
    CHANNEL_CODEC_QUALITY, //int
    CHANNEL_FORCED_SILENCE, //int
    CHANNEL_ICON_ID, //int
    CHANNEL_CODEC_IS_UNENCRYPTED, //int
    CHANNEL_SECONDS_EMPTY //int
    };


    enum TSC_CLIENT_QUERYDATA
    {
    INVALID,
    CLIENT_NICKNAME, //string
    CLIENT_VERSION, //string
    CLIENT_PLATFORM, //string
    CLIENT_INPUT_MUTED, //int
    CLIENT_OUTPUT_MUTED, //int
    CLIENT_INPUT_HARDWARE, //int
    CLIENT_OUTPUT_HARDWARE, //int
    CLIENT_CHANNEL_GROUP_ID, //int
    CLIENT_SERVER_GROUPS, //string (list of numbers, separated by a comma)
    CLIENT_FIRSTCONNECTED, //int (UTC timestamp of first connection)
    CLIENT_LASTCONNECTED, //int (UTC timestamp of last connection)
    CLIENT_TOTALCONNECTIONS, //int
    CLIENT_AWAY, //int
    CLIENT_AWAY_MESSAGE, //string
    CLIENT_AVATAR, //string
    CLIENT_TALK_POWER, //int
    CLIENT_TALK_REQUEST, //int
    CLIENT_TALK_REQUEST_MSG, //string
    CLIENT_IS_TALKER, //int
    CLIENT_IS_PRIORITY_SPEAKER, //int
    CLIENT_DESCRIPTION, //string
    CLIENT_IS_CHANNEL_COMMANDER, //int
    CLIENT_ICON_ID, //int
    CLIENT_COUNTRY, //string
    CLIENT_IDLE_TIME, //int (seconds)
    CLIENT_IS_RECORDING //int
    };


    enum /*teamspeak channel codecs*/
    {
    CODEC_SPEEX_NARROWBAND = 0, // 0: speex narrowband (mono, 16bit, 8kHz)
    CODEC_SPEEX_WIDEBAND, // 1: speex wideband (mono, 16bit, 16kHz)
    CODEC_SPEEX_ULTRAWIDEBAND, // 2: speex ultra-wideband (mono, 16bit, 32kHz)
    CODEC_CELT_MONO, // 3: celt mono (mono, 16bit, 48kHz)
    CODEC_OPUS_VOICE, //4: opus voice
    CODEC_OPUS_MUSIC //5: opus music
    };


    enum TSC_ERROR_TYPE
    {
    INVALID,
    CONNECTION_ERROR,
    TEAMSPEAK_ERROR,
    CALLBACK_ERROR
    };



    //server functions
    native TSC_Connect(user[], pass[], hostname[], port = 9987, serverquery_port = 10011);
    native TSC_Disconnect();
    native TSC_ChangeNickname(nickname[]);
    native TSC_SendServerMessage(msg[]);



    //data query functions
    native TSC_QueryChannelData(channelid, TSC_CHANNEL_QUERYDATA:data, const callback[], const format[] = "", {Float, _}:...);
    native TSC_QueryClientData(clientid, TSC_CLIENT_QUERYDATA:data, const callback[], const format[] = "", {Float, _}:...);
    native TSC_GetQueriedData(dest[], max_len = sizeof(dest));
    native TSC_GetQueriedDataAsInt();



    //channel functions
    native TSC_CreateChannel(channelname[], TSC_CHANNELTYPE:type = TEMPORARY, maxusers = -1, parentchannelid = -1, upperchannelid = -1, talkpower = 0);
    native TSC_DeleteChannel(channelid);
    native TSC_GetChannelIdByName(channelname[]);
    native TSC_IsValidChannel(channelid);
    native TSC_SetChannelName(channelid, channelname[]);
    native TSC_GetChannelName(channelid, dest[], maxlen = sizeof(dest));
    native TSC_SetChannelDescription(channelid, desc[]);
    native TSC_SetChannelType(channelid, TSC_CHANNELTYPE:type);
    native TSC_CHANNELTYPE:TSC_GetChannelType(channelid);
    native TSC_SetChannelPassword(channelid, password[]);
    native TSC_HasChannelPassword(channelid);
    native TSC_SetChannelRequiredTP(channelid, talkpower);
    native TSC_GetChannelRequiredTP(channelid);
    native TSC_SetChannelUserLimit(channelid, maxusers);
    native TSC_GetChannelUserLimit(channelid);
    native TSC_SetChannelParentId(channelid, parentchannelid);
    native TSC_GetChannelParentId(channelid);
    native TSC_SetChannelOrderId(channelid, upperchannelid);
    native TSC_GetChannelOrderId(channelid);
    native TSC_GetDefaultChannelId();



    //client functions
    native TSC_GetClientIdByUid(uid[]);
    native TSC_GetClientIdByIpAddress(ip[]);


    native TSC_GetClientUid(clientid, dest[], maxlen = sizeof(dest));
    native TSC_GetClientDatabaseId(clientid);
    native TSC_GetClientChannelId(clientid);
    native TSC_GetClientIpAddress(clientid, dest[], maxlen = sizeof(dest));


    native TSC_KickClient(clientid, TSC_KICKTYPE:kicktype, reasonmsg[] = "");
    native TSC_BanClient(clientuid[], seconds, reasonmsg[]);
    native TSC_MoveClient(clientid, channelid);


    native TSC_SetClientChannelGroup(clientid, groupid, channelid);
    native TSC_AddClientToServerGroup(clientid, groupid);
    native TSC_RemoveClientFromServerGroup(clientid, groupid);


    native TSC_PokeClient(clientid, msg[]);
    native TSC_SendClientMessage(clientid, msg[]);





    //server callbacks
    forward TSC_OnConnect();
    forward TSC_OnError(TSC_ERROR_TYPE:error_type, error_id, const error_msg[]);


    //channel callbacks
    forward TSC_OnChannelCreated(channelid);
    forward TSC_OnChannelDeleted(channelid);
    forward TSC_OnChannelReorder(channelid, orderid);
    forward TSC_OnChannelMoved(channelid, parentid, orderid);
    forward TSC_OnChannelRenamed(channelid, name[]);
    forward TSC_OnChannelPasswordEdited(channelid, bool:ispassworded, bool:passwordchanged);
    forward TSC_OnChannelTypeChanged(channelid, TSC_CHANNELTYPE:type);
    forward TSC_OnChannelSetDefault(channelid);
    forward TSC_OnChannelMaxClientsChanged(channelid, maxclients);
    forward TSC_OnChannelRequiredTPChanged(channelid, talkpower);


    //client callbacks
    forward TSC_OnClientConnect(clientid, nickname[]);
    forward TSC_OnClientDisconnect(clientid, reasonid, reasonmsg[]);
    forward TSC_OnClientMoved(clientid, to_channelid, invokerid);
    forward TSC_OnClientServerText(clientid, nickname[], msg[]);
    forward TSC_OnClientPrivateText(from_clid, from_nickname[], to_clid, msg[]);


  • Code
    native TSC_Connect(user[], pass[], hostname[], port = 9987, serverquery_port = 10011);

    Da siehst du es, Argument 4 und 5 sind Zahlen.



    Code
    TSC_Connect("serveradmin", "********", "Epic-roleplay.de", 9987, 10011);

    PAWNit gratis nutzen?
    Geschenkcode: 2017VQXPKB8V3KA

    Hier könnte Ihre Werbung stehen.

  • Nein, das ist eine Einführung in die Pawn Sprache. Dort kannst du dir Datentypen, Funktionsaufrufe, Deklarationen etc. ansehen. - Leider auf Englisch, ich habe nichts sinnvolles auf Deutsch gefunden.

    PAWNit gratis nutzen?
    Geschenkcode: 2017VQXPKB8V3KA

    Hier könnte Ihre Werbung stehen.

  • Ja dafür sollte mein English hoffentlich reichen :D was ich allerdings grade nicht verstehe das der server seid neusten das hier debugt





    [13:10:16] [debug] Run time error 4: "Array index out of bounds"
    [13:10:16] [debug] Accessing element at index 65535 past array upper bound 1149
    [13:10:16] [debug] AMX backtrace:
    [13:10:16] [debug] #0 0032b0b8 in public FC_OnPlayerStateChange (49, 1, 2) from EpicRoleplay.amx
    [13:10:16] [debug] #1 native CallLocalFunction () from samp-server.exe
    [13:10:16] [debug] #2 00004068 in public OnPlayerStateChange (49, 1, 2) from EpicRoleplay.amx
    [13:10:59] [debug] Run time error 4: "Array index out of bounds"
    [13:10:59] [debug] Accessing element at index 65535 past array upper bound 1149
    [13:10:59] [debug] AMX backtrace:
    [13:10:59] [debug] #0 0032b0b8 in public FC_OnPlayerStateChange (49, 1, 2) from EpicRoleplay.amx
    [13:10:59] [debug] #1 native CallLocalFunction () from samp-server.exe
    [13:10:59] [debug] #2 00004068 in public OnPlayerStateChange (49, 1, 2) from EpicRoleplay.amx
    [13:12:25] [debug] Run time error 4: "Array index out of bounds"
    [13:12:25] [debug] Accessing element at index 65535 past array upper bound 1149
    [13:12:25] [debug] AMX backtrace:
    [13:12:25] [debug] #0 0032b0b8 in public FC_OnPlayerStateChange (49, 1, 2) from EpicRoleplay.amx
    [13:12:25] [debug] #1 native CallLocalFunction () from samp-server.exe
    [13:12:25] [debug] #2 00004068 in public OnPlayerStateChange (49, 1, 2) from EpicRoleplay.amx
    [13:12:43] [debug] Run time error 4: "Array index out of bounds"
    [13:12:43] [debug] Accessing element at index 65535 past array upper bound 1149
    [13:12:43] [debug] AMX backtrace:
    [13:12:43] [debug] #0 0032b0b8 in public FC_OnPlayerStateChange (49, 1, 2) from EpicRoleplay.amx
    [13:12:43] [debug] #1 native CallLocalFunction () from samp-server.exe


    [13:12:43] [debug] #2 00004068 in public OnPlayerStateChange (49, 1, 2) from EpicRoleplay.amx