Warnings ich weiß aber nicht wieso...

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 ein /derby Befehl gemacht nun kommen diese Warnings ich weiß aber nicht warum habe es genau so geschrieben wie es in der SA:MP Wiki steht. http://wiki.sa-mp.com/wiki/LinkVehicleToInterior


    Code:
    new derby = CreateVehicle(556,-1494.9049,954.9460,1037.3197,323.3224,2,2); // DerbyCar 1
    new derby1 = CreateVehicle(556,-1499.0427,958.3802,1037.3893,320.4992,2,2); // DerbyCar 2
    new derby2 = CreateVehicle(556,-1502.6772,961.5918,1037.4480,316.3713,2,2); // DerbyCar 3
    new derby3 = CreateVehicle(556,-1506.0228,965.3120,1037.5149,310.9712,2,2); // DerbyCar 4
    new derby4 = CreateVehicle(556,-1509.5098,968.6794,1037.5795,309.1057,2,2); // DerbyCar 5
    new derby5 = CreateVehicle(556,-1513.3903,972.3384,1037.6459,302.5430,2,2); // DerbyCar 6
    new derby6 = CreateVehicle(556,-1514.6708,977.0979,1037.7274,297.7163,2,2); // DerbyCar 7
    new derby7 = CreateVehicle(556,-1517.8114,981.4877,1037.8047,292.6915,2,2); // DerbyCar 8
    new derby8 = CreateVehicle(556,-1517.5917,986.3986,1037.8865,279.5091,2,2); // DerbyCar 9
    new derby9 = CreateVehicle(556,-1518.6635,991.4472,1037.9767,275.3861,2,2); // DerbyCar 10
    new derby10 = CreateVehicle(556,-1518.3047,996.2485,1038.0533,271.7253,2,2); // DerbyCar 11
    new derby11 = CreateVehicle(556,-1518.7496,1000.9996,1038.1281,262.5334,2,2); // DerbyCar 12
    new derby12 = CreateVehicle(556,-1517.4056,1005.7670,1038.2006,256.3130,2,2); // DerbyCar 13
    new derby13 = CreateVehicle(556,-1517.0852,1010.7829,1038.2877,247.7973,2,2); // DerbyCar 14
    new derby14 = CreateVehicle(556,-1513.6987,1016.5019,1038.3751,240.9674,2,2); // DerbyCar 15
    new derby15 = CreateVehicle(556,-1509.1531,1021.0173,1038.4437,236.3729,2,2); // DerbyCar 16
    new derby16 = CreateVehicle(556,-1506.2198,1024.8110,1038.5009,229.0759,2,2); // DerbyCar 17
    new derby17 = CreateVehicle(556,-1502.8624,1028.7280,1038.5623,227.4691,2,2); // DerbyCar 18
    new derby18 = CreateVehicle(556,-1500.1505,1033.2076,1038.6338,222.7940,2,2); // DerbyCar 19
    new derby19 = CreateVehicle(556,-1495.6071,1035.3374,1038.6589,220.9777,2,2); // DerbyCar 20

    LinkVehicleToInterior(derby,15);
    LinkVehicleToInterior(derby1,15);
    LinkVehicleToInterior(derby2,15);
    LinkVehicleToInterior(derby3,15);
    LinkVehicleToInterior(derby4,15);
    LinkVehicleToInterior(derby5,15);
    LinkVehicleToInterior(derby6,15);
    LinkVehicleToInterior(derby7,15);
    LinkVehicleToInterior(derby8,15);
    LinkVehicleToInterior(derby9,15);
    LinkVehicleToInterior(derby10,15);
    LinkVehicleToInterior(derby11,15);
    LinkVehicleToInterior(derby12,15);
    LinkVehicleToInterior(derby13,15);
    LinkVehicleToInterior(derby14,15);
    LinkVehicleToInterior(derby15,15);
    LinkVehicleToInterior(derby16,15);
    LinkVehicleToInterior(derby17,15);
    LinkVehicleToInterior(derby18,15);
    LinkVehicleToInterior(derby19,15);


    Warnings:
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22233) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22234) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22235) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22236) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22237) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22238) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22239) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22240) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22241) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22242) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22243) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22244) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22245) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22246) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22247) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22248) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22273) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22274) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22275) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22276) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22277) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22278) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22279) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22280) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22281) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22282) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22283) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22284) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22285) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22286) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22287) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22288) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22289) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22290) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22291) : warning 202: number of arguments does not match definition
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22292) : warning 202: number of arguments does not match definition

    Mit freundlichen Grüßen

  • 1. Das kommt daher, dass du bei CreateVehicle etwas vergessen hast.
    Denn: CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay)
    So ist CreateVehicle aufgebaut, dir fehlt also noch der Timer zum Respawnen.
    http://wiki.sa-mp.com/wiki/CreateVehicle_DE


    2. Mach es doch so, du erstellst global, also über OnGameModeInit das hier:
    new derby[21];
    Und dann machst du bei OnGameModeInit das:
    derby[0] = CreateVehicle(....);
    derby[1] = CreateVehicle(....);
    usw.

  • Bekomme nun


    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : error 021: symbol already defined: "derby"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 215: expression has no effect
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : error 017: undefined symbol "derby11"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 215: expression has no effect
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby9"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby8"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby7"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby6"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby5"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby4"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby3"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby2"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(12205) : warning 203: symbol is never used: "derby"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22277) : error 017: undefined symbol "derby"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22278) : error 017: undefined symbol "derby1"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22279) : error 017: undefined symbol "derby2"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22280) : error 017: undefined symbol "derby3"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22281) : error 017: undefined symbol "derby4"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22282) : error 017: undefined symbol "derby5"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22283) : error 017: undefined symbol "derby6"
    xDC:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22285) : error 017: undefined symbol "derby8"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22286) : error 017: undefined symbol "derby9"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22287) : error 017: undefined symbol "derby10"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22288) : error 017: undefined symbol "derby11"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22289) : error 017: undefined symbol "derby12"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22290) : error 017: undefined symbol "derby13"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22291) : error 017: undefined symbol "derby14"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22292) : error 017: undefined symbol "derby15"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22293) : error 017: undefined symbol "derby16"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22294) : error 017: undefined symbol "derby17"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22295) : error 017: undefined symbol "derby18"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22296) : error 017: undefined symbol "derby19"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22298) : error 017: undefined symbol "derby"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22299) : error 017: undefined symbol "derby1"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22300) : error 017: undefined symbol "derby2"
    C:\Users\xD\Desktop\\German Gaming Reallife\gamemodes\SS.pwn(22301) : error 017: undefined symbol "derby3"

    Mit freundlichen Grüßen

  • Auch wenn es nicht effizient ist, kannst du es so machen wie du es geschrieben hast. Die Warnings erscheinen nur, weil CreateVehicle hinten noch ein Attribut braucht, häng einfach eine -1 überall hinten dran ;)


    mfg. :thumbup:

    ast2ufdyxkb1.png


    Leute, lernt scripten und versucht mal lieber etwas selber zu schreiben, als es aus einem GF zu kopieren. :S

  • Command:
    if(strcmp("/cderby3", cmdtext, true, 10) == 0)
    {
    if(PlayerInfo[playerid][pAdmin] > 1)
    {
    SendClientMessageToAll(rot, "Ein Derby Event ist Aktiv benutze /derby3 um dich zu teleportieren! ( Regeln: /derbyregeln )");
    SetPlayerPos(playerid, -1406.8781, 996.2184, 1025.9349);
    SetPlayerInterior(playerid, 15);
    derby = CreateVehicle(556,-1494.9049,954.9460,1037.3197,323.3224,2,2,-1); // DerbyCar 1
    derby1 = CreateVehicle(556,-1499.0427,958.3802,1037.3893,320.4992,2,2,-1); // DerbyCar 2
    derby2 = CreateVehicle(556,-1502.6772,961.5918,1037.4480,316.3713,2,2,-1); // DerbyCar 3
    derby3 = CreateVehicle(556,-1506.0228,965.3120,1037.5149,310.9712,2,2,-1); // DerbyCar 4
    derby4 = CreateVehicle(556,-1509.5098,968.6794,1037.5795,309.1057,2,2,-1); // DerbyCar 5
    derby5 = CreateVehicle(556,-1513.3903,972.3384,1037.6459,302.5430,2,2,-1); // DerbyCar 6
    derby6 = CreateVehicle(556,-1514.6708,977.0979,1037.7274,297.7163,2,2,-1); // DerbyCar 7
    derby7 = CreateVehicle(556,-1517.8114,981.4877,1037.8047,292.6915,2,2,-1); // DerbyCar 8
    derby8 = CreateVehicle(556,-1517.5917,986.3986,1037.8865,279.5091,2,2,-1); // DerbyCar 9
    derby9 = CreateVehicle(556,-1518.6635,991.4472,1037.9767,275.3861,2,2,-1); // DerbyCar 10
    derby10 = CreateVehicle(556,-1518.3047,996.2485,1038.0533,271.7253,2,2,-1); // DerbyCar 11
    derby11 = CreateVehicle(556,-1518.7496,1000.9996,1038.1281,262.5334,2,2,-1); // DerbyCar 12
    derby12 = CreateVehicle(556,-1517.4056,1005.7670,1038.2006,256.3130,2,2,-1); // DerbyCar 13
    derby13 = CreateVehicle(556,-1517.0852,1010.7829,1038.2877,247.7973,2,2,-1); // DerbyCar 14
    derby14 = CreateVehicle(556,-1513.6987,1016.5019,1038.3751,240.9674,2,2,-1); // DerbyCar 15
    derby15 = CreateVehicle(556,-1509.1531,1021.0173,1038.4437,236.3729,2,2,-1); // DerbyCar 16
    derby16 = CreateVehicle(556,-1506.2198,1024.8110,1038.5009,229.0759,2,2,-1); // DerbyCar 17
    derby17 = CreateVehicle(556,-1502.8624,1028.7280,1038.5623,227.4691,2,2,-1); // DerbyCar 18
    derby18 = CreateVehicle(556,-1500.1505,1033.2076,1038.6338,222.7940,2,2,-1); // DerbyCar 19
    derby19 = CreateVehicle(556,-1495.6071,1035.3374,1038.6589,220.9777,2,2,-1); // DerbyCar 20

    LinkVehicleToInterior(derby,15);
    LinkVehicleToInterior(derby1,15);
    LinkVehicleToInterior(derby2,15);
    LinkVehicleToInterior(derby3,15);
    LinkVehicleToInterior(derby4,15);
    LinkVehicleToInterior(derby5,15);
    LinkVehicleToInterior(derby6,15);
    LinkVehicleToInterior(derby7,15);
    LinkVehicleToInterior(derby8,15);
    LinkVehicleToInterior(derby9,15);
    LinkVehicleToInterior(derby10,15);
    LinkVehicleToInterior(derby11,15);
    LinkVehicleToInterior(derby12,15);
    LinkVehicleToInterior(derby13,15);
    LinkVehicleToInterior(derby14,15);
    LinkVehicleToInterior(derby15,15);
    LinkVehicleToInterior(derby16,15);
    LinkVehicleToInterior(derby17,15);
    LinkVehicleToInterior(derby18,15);
    LinkVehicleToInterior(derby19,15);
    }
    }



    Unter OnGameModeInit:
    new derby, derby2, derby3, derby4, derby5, derby6, derby7, derby8, derby9 ,derby 10, derby11, derby12, derby13, derby14, derby15, derby16, derby17, derby18, derby19;


    Gelöscht werden sie auch nicht:
    if(strcmp("/delderby3", cmdtext, true, 10) == 0)
    {
    if(PlayerInfo[playerid][pAdmin] > 1)
    {
    SendClientMessageToAll(rot, "Das /derby3 Event ist beendet!");
    derby = DestoryVehicle(556,-1494.9049,954.9460,1037.3197,323.3224,2,2,-1); // DerbyCar 1
    derby1 = DestoryVehicle(556,-1499.0427,958.3802,1037.3893,320.4992,2,2,-1); // DerbyCar 2
    derby2 = DestoryVehicle(556,-1502.6772,961.5918,1037.4480,316.3713,2,2,-1); // DerbyCar 3
    derby3 = DestoryVehicle(556,-1506.0228,965.3120,1037.5149,310.9712,2,2,-1); // DerbyCar 4
    derby4 = DestoryVehicle(556,-1509.5098,968.6794,1037.5795,309.1057,2,2,-1); // DerbyCar 5
    derby5 = DestoryVehicle(556,-1513.3903,972.3384,1037.6459,302.5430,2,2,-1); // DerbyCar 6
    derby6 = DestoryVehicle(556,-1514.6708,977.0979,1037.7274,297.7163,2,2,-1); // DerbyCar 7
    derby7 = DestoryVehicle(556,-1517.8114,981.4877,1037.8047,292.6915,2,2,-1); // DerbyCar 8
    derby8 = DestoryVehicle(556,-1517.5917,986.3986,1037.8865,279.5091,2,2,-1); // DerbyCar 9
    derby9 = DestoryVehicle(556,-1518.6635,991.4472,1037.9767,275.3861,2,2,-1); // DerbyCar 10
    derby10 = DestoryVehicle(556,-1518.3047,996.2485,1038.0533,271.7253,2,2,-1); // DerbyCar 11
    derby11 = DestoryVehicle(556,-1518.7496,1000.9996,1038.1281,262.5334,2,2,-1); // DerbyCar 12
    derby12 = DestoryVehicle(556,-1517.4056,1005.7670,1038.2006,256.3130,2,2,-1); // DerbyCar 13
    derby13 = DestoryVehicle(556,-1517.0852,1010.7829,1038.2877,247.7973,2,2,-1); // DerbyCar 14
    derby14 = DestoryVehicle(556,-1513.6987,1016.5019,1038.3751,240.9674,2,2,-1); // DerbyCar 15
    derby15 = DestoryVehicle(556,-1509.1531,1021.0173,1038.4437,236.3729,2,2,-1); // DerbyCar 16
    derby16 = DestoryVehicle(556,-1506.2198,1024.8110,1038.5009,229.0759,2,2,-1); // DerbyCar 17
    derby17 = DestoryVehicle(556,-1502.8624,1028.7280,1038.5623,227.4691,2,2,-1); // DerbyCar 18
    derby18 = DestoryVehicle(556,-1500.1505,1033.2076,1038.6338,222.7940,2,2,-1); // DerbyCar 19
    derby19 = DestoryVehicle(556,-1495.6071,1035.3374,1038.6589,220.9777,2,2,-1); // DerbyCar 20
    }
    }*/


    Edit Kalibier die Cars sollen ja auch gelöscht werden : )

    Mit freundlichen Grüßen