Include Errors

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,


    wieso bekomme ich Errors/Warnings, wenn ich in einem Include eine
    Funktion als stock erstelle und dann ein native dazusetze?


    Include-Code;

    Spoiler anzeigen
    native SCM(playerid, color, const message[]);
    native SPD(playerid, dialogid, style, caption[], info[], button1[], button2[]);
    native CTL(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS);
    native Kill(playerid);
    native Fehler(playerid,text[]);
    native Error(playerid,text[]);
    native LabelToPlayer(playerid, color, string[]);
    native VehicleEngine(vehicleid, state);
    native VehicleLights(vehicleid, state);
    native VehicleAlarm(vehicleid, state);
    native VehicleDoors(vehicleid, state);
    native VehicleBonnet(vehicleid, state);
    native VehicleBoot(vehicleid, state);
    native VehicleObjective(vehicleid, state);
    native formatEx(playerid,color,const msg[], {Float,_}...);

    #define aRot 0xC72E41FF

    Spoiler anzeigen
    stock SCM(playerid, color, const message[]) { SendClientMessage(playerid,color,message); return 1; }
    stock SPD(playerid, dialogid, style, caption[], info[], button1[], button2[]) { ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2); return 1; }
    stock CTL(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS) { Create3DTextLabel(text, color, X, Y, Z, DrawDistance, virtualworld, testLOS); return 1; }

    Spoiler anzeigen
    stock Kill(playerid) { SetPlayerHealth(playerid,0.00); SetPlayerArmour(playerid,0.00); return 1; }
    stock Fehler(playerid,text[]) { SendClientMessage(playerid,0xBEBEBEFF,text); return 1; }
    stock Error(playerid,text[]){ new str[128]; format(str,sizeof(str),"Error! Benötigter Rang: %s",text); SendClientMessage(playerid,aRot,str); }
    stock LabelToPlayer(playerid, color, string[]) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); CTL(string, color, X, Y, Z, 30.0, 0, 1); return 1; }
    stock VehicleEngine(vehicleid, onaus) { new eng,q,w,e,r,t,z; GetVehicleParamsEx(vehicleid,eng,q,w,e,r,t,z); SetVehicleParamsEx(vehicleid,onaus,q,w,e,r,t,z); return 1; }
    stock VehicleLights(vehicleid, onaus) {new eng,q,w,e,r,t,z; GetVehicleParamsEx(vehicleid,eng,q,w,e,r,t,z); SetVehicleParamsEx(vehicleid,eng,onaus,w,e,r,t,z); return 1; }
    stock VehicleAlarm(vehicleid, onaus) { new eng,q,w,e,r,t,z; GetVehicleParamsEx(vehicleid,eng,q,w,e,r,t,z); SetVehicleParamsEx(vehicleid,eng,q,onaus,e,r,t,z); return 1; }
    stock VehicleDoors(vehicleid, onaus) { new eng,q,w,e,r,t,z; GetVehicleParamsEx(vehicleid,eng,q,w,e,r,t,z); SetVehicleParamsEx(vehicleid,eng,q,w,onaus,r,t,z); return 1; }
    stock VehicleBonnet(vehicleid, onaus) { new eng,q,w,e,r,t,z; GetVehicleParamsEx(vehicleid,eng,q,w,e,r,t,z); SetVehicleParamsEx(vehicleid,eng,q,w,e,onaus,t,z); return 1; }
    stock VehicleBoot(vehicleid, onaus) { new eng,q,w,e,r,t,z; GetVehicleParamsEx(vehicleid,eng,q,w,e,r,t,z); SetVehicleParamsEx(vehicleid,eng,q,w,e,r,onaus,z); return 1; }
    stock VehicleObjective(vehicleid, onaus) { new eng,q,w,e,r,t,z; GetVehicleParamsEx(vehicleid,eng,q,w,e,r,t,z); SetVehicleParamsEx(vehicleid,eng,q,w,e,r,t,onaus); return 1; }
    new sh12string[128];
    #define formatEx(%0,%1,%2,%3) format(sh12string,128,%2,%3) && SendClientMessage(%0, %1, sh12string) // FormatEx(playerid,color,const msg[], {Float,_}...);
    #define formatToAll(%0,%1,%2) format(sh12string,128,%1,%2) && SendClientMessageToAll(%0, sh12string)


    Errors;

    Spoiler anzeigen
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(11) : error 010: invalid function or declaration
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(12) : error 010: invalid function or declaration
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(13) : error 010: invalid function or declaration
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(14) : error 010: invalid function or declaration
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(15) : error 010: invalid function or declaration
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(16) : error 010: invalid function or declaration
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(17) : error 010: invalid function or declaration
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(18) : error 001: expected token: ":", but found "..."
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(22) : error 021: symbol already defined: "SCM"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(23) : error 021: symbol already defined: "SPD"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(24) : error 021: symbol already defined: "CTL"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(26) : error 021: symbol already defined: "Kill"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(27) : error 021: symbol already defined: "Fehler"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(28) : error 021: symbol already defined: "Error"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(29) : error 021: symbol already defined: "LabelToPlayer"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(30) : error 021: symbol already defined: "VehicleEngine"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(31) : error 021: symbol already defined: "VehicleLights"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(32) : error 021: symbol already defined: "VehicleAlarm"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(33) : error 021: symbol already defined: "VehicleDoors"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(34) : error 021: symbol already defined: "VehicleBonnet"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(35) : error 021: symbol already defined: "VehicleBoot"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\pawno\include\sh12.inc(36) : error 021: symbol already defined: "VehicleObjective"
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\gamemodes\Untitled.pwn(102) : warning 202: number of arguments does not match definition
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\gamemodes\Untitled.pwn(103) : warning 202: number of arguments does not match definition
    C:\Users\Narushi\Desktop\Scripting\PAWN\New-Evolution-Reallife\gamemodes\Untitled.pwn(236) : warning 203: symbol is never used: "sh12string"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Spoiler anzeigen
    22 Errors.