ErionX 2 Odesláno: 28. Červenec, 2012 Share Odesláno: 28. Červenec, 2012 Zdravim mám takový problém skusil jsem si udělat do modu Řidičák s checkpointy podle tohodle návodu V2 idicak-s-checkpointy-t5725.html Ale mám 5 Errorů error 017: undefined symbol "Current" error 017: undefined symbol "Ridicak" warning 215: expression has no effect error 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line Errory jsou na těchto řádcích if (Current == tvemenu ) { else if (Ridicak[playerid] == 1) {// ze už má řidičák V pawno jsem začátečník ... Proto potřebuji help + menší vysvětlení Link to comment Share on other sites More sharing options...
0 zuzka 1 Odesláno: 28. Červenec, 2012 Share Odesláno: 28. Červenec, 2012 skus takto else if (Ridicak[playerid] == 1) {// ze už má řidičák SendClientMessage(playerid, COLOR_WHITE, "[ ! ] Už máš řidičák!");//posle zprávu že již má řidičák }else{//když tyto podmínky splnuje GivePlayerMoney(playerid,-2000); SendClientMessage(playerid,COLOR_BLUE,"[ ! ] Projiždej Cheackpointy!");//posle zprávu že dělá test SetPlayerCheckpoint(playerid,Pozice X,Y,Z,7.0);//Nastaví checkpoint autoskolacar = CreateVehicle(ID Auta, X, Y, Z, Facing, random(100), random(100), 1000); // Vytvorí auto PutPlayerInVehicle(playerid, autoskolacar,0); autoskola[playerid] = Check2;//a když do něj vejde, přejde na další } } } } Link to comment Share on other sites More sharing options...
0 ErionX 2 Odesláno: 28. Červenec, 2012 Author Share Odesláno: 28. Červenec, 2012 Nepomohlo 4 errory Link to comment Share on other sites More sharing options...
0 Hrb™ 48 Odesláno: 28. Červenec, 2012 Share Odesláno: 28. Červenec, 2012 Jaké? + řádky. Link to comment Share on other sites More sharing options...
0 zuzka 1 Odesláno: 28. Červenec, 2012 Share Odesláno: 28. Červenec, 2012 a toto tam maš? new ridicak[MAX_PLAYERS]; new pickup; new Menu:tvemenu; new autoskola[MAX_PLAYERS]; new autoskolacar; Link to comment Share on other sites More sharing options...
0 ErionX 2 Odesláno: 28. Červenec, 2012 Author Share Odesláno: 28. Červenec, 2012 C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(306) : error 029: invalid expression, assumed zero C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(306) : warning 215: expression has no effect C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(306) : error 001: expected token: ";", but found "if" C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(306) : error 017: undefined symbol "Ridicak" C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(306) : fatal error 107: too many error messages on one line Řádek else if (Ridicak[playerid] == 1) {// ze už má řidičák Link to comment Share on other sites More sharing options...
0 ErionX 2 Odesláno: 28. Červenec, 2012 Author Share Odesláno: 28. Červenec, 2012 a toto tam maš? new ridicak[MAX_PLAYERS]; new pickup; new Menu:tvemenu; new autoskola[MAX_PLAYERS]; new autoskolacar; Ano Link to comment Share on other sites More sharing options...
0 Hrb™ 48 Odesláno: 28. Červenec, 2012 Share Odesláno: 28. Červenec, 2012 tady je malé "r" - new ridicak[MAX_PLAYERS]; ale ty tam máš velké "R" (else if (Ridicak[playerid] == 1))- přepiš si to na malé "r" Link to comment Share on other sites More sharing options...
0 ErionX 2 Odesláno: 28. Červenec, 2012 Author Share Odesláno: 28. Červenec, 2012 Přepsal jsem to a další errory C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(298) : error 029: invalid expression, assumed zero C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(298) : warning 215: expression has no effect C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(298) : error 001: expected token: ";", but found "if" C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(304) : error 017: undefined symbol "ID" C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(304) : error 017: undefined symbol "Auta" C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(304) : error 029: invalid expression, assumed zero C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(304) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors. Řádek else if (ridicak[playerid] == 1) {// ze už má řidičák autoskolacar = CreateVehicle(ID Auta, X, Y, Z, Facing, random(100), random(100), 1000); // Vytvorí auto Link to comment Share on other sites More sharing options...
0 GiGi 0 Odesláno: 28. Červenec, 2012 Share Odesláno: 28. Červenec, 2012 autoskolacar = CreateVehicle(ID Auta, X, Y, Z, Facing, random(100), random(100), 1000); // Vytvorí auto Čo tak tam pridať ID auta, súradnice (X,Y,Z), a rotáciu ? Link to comment Share on other sites More sharing options...
0 ErionX 2 Odesláno: 28. Červenec, 2012 Author Share Odesláno: 28. Červenec, 2012 V tomhle mám chyby (rotaci když nevím pozice těch rotací a napíšu tam třeba 50 tak auto bude na střeše ne ? ) public OnPlayerSelectedMenuRow(playerid, row) { else if (ridicak[playerid] == 1) {// ze už má řidičák SendClientMessage(playerid, COLOR_WHITE, "[ ! ] Už máš řidičák!");//posle zprávu že již má řidičák }else{//když tyto podmínky splnuje GivePlayerMoney(playerid,-2000); SendClientMessage(playerid,COLOR_BLUE,"[ ! ] Projiždej Cheackpointy!");//posle zprávu že dělá test SetPlayerCheckpoint(playerid, -2087.008056, -30.665533, 34.868064,7.0);//Nastaví checkpoint autoskolacar = CreateVehicle(562, X, Y, Z, Facing, random(100), random(100), 1000); // Vytvorí auto PutPlayerInVehicle(playerid, autoskolacar,0); autoskola[playerid] = Check2;//a když do něj vejde, přejde na další } } } } return 1; } Přesněji else if (ridicak[playerid] == 1) {// ze už má řidičák autoskolacar = CreateVehicle(562, X, Y, Z, Facing, random(100), random(100), 1000); // Vytvorí auto } return 1; C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(298) : error 029: invalid expression, assumed zero C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(298) : warning 215: expression has no effect C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(298) : error 001: expected token: ";", but found "if" C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(304) : error 017: undefined symbol "X" C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(309) : error 054: unmatched closing brace ("}") C:\Documents and Settings\Josef\Plocha\new ridicak.pwn(311) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. Link to comment Share on other sites More sharing options...
0 GiGi 0 Odesláno: 28. Červenec, 2012 Share Odesláno: 28. Červenec, 2012 Skúšal som to spraviť, vypadá to nejako takto: // This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include #include new Ridicak[MAX_PLAYERS]; new pickup; new Menu:tvemenu; new autoskola[MAX_PLAYERS]; new autoskolacar; #define COLOR_BLUE 0x0000FFAA #define COLOR_RED 0xAA3333AA #define COLOR_WHITE 0xFFFFFFAA #define Check2 2 #define Check3 3 #define Check4 4 #define Check5 5 #define Check6 6 #define Check7 7 #define Check8 8 #define Check9 9 #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnGameModeInit() { pickup = CreatePickup(1218,1,1,1,1);//Zadej ID A souradnice kde se objevi pickup a s jakou ikonou (nej je 1581) tvemenu = CreateMenu("Ridicak", 1, 150.0, 100.0, 250.0, 150.0);// AddMenuItem(tvemenu, 0, "Udelat Test"); //Dejte sem co chcete treba koupit ridicak,udelat ridicak... AddMenuItem(tvemenu, 0, "Konec"); //tady dejte to co mu to menu skryje. // Don't use these lines if it's a filterscript SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; } public OnPlayerConnect(playerid) { Ridicak[playerid] = dUserINT(PlayerName(playerid)).("ridicak");//da ridičák pod loginu return 1; } public OnPlayerDisconnect(playerid, reason) { dUserSetINT(PlayerName(playerid)).("ridicak",Ridicak[playerid]);//Uloží řidičák return 1; } public OnPlayerEnterCheckpoint(playerid) { switch(autoskola[playerid]) { case Check2: { DisablePlayerCheckpoint(playerid);//vypne predesli SetPlayerCheckpoint(playerid,1,1,1,7.0);//sem zase novej checkpoint autoskola[playerid] = Check3;//Přepne na dalsi checkpoint //a zase dookola } case Check3: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1,1,1,7.0);//sem zase novej checkpoint autoskola[playerid] = Check4; } case Check4: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1,1,1,7.0);//sem zase novej checkpoint autoskola[playerid] = Check5; } case Check5: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1,1,1,7.0);//sem zase novej checkpoint autoskola[playerid] = Check6; } case Check6: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1,1,1,7.0);//sem zase novej checkpoint autoskola[playerid] = Check7; } case Check7: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1,1,1,7.0);//sem zase novej checkpoint autoskola[playerid] = Check8; } case Check8: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1,1,1,7.0);//sem zase novej checkpoint autoskola[playerid] = Check9; } case Check9: { DisablePlayerCheckpoint(playerid); Ridicak[playerid] = 1;//da mu ridicak DestroyVehicle(autoskolacar); SendClientMessage(playerid,COLOR_WHITE,"[ ! ] Udělal sis řidičák!"); // posle zprávu že Dostal ridicak } } return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == pickup){ ShowMenuForPlayer(tvemenu,playerid);//Ukáže menu } return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { new Menu:Current = GetPlayerMenu(playerid); if (Current == tvemenu ) { switch(row) { case 0:{ if(GetPlayerMoney(playerid) < 1999) {// nemá peníze SendClientMessage(playerid, COLOR_RED, "[ ! ] Nemáš peníze [ 2000,- ].");//posle zprávu že nemá prachy } else if (Ridicak[playerid] == 1) {// ze už má řidičák SendClientMessage(playerid, COLOR_WHITE, "[ ! ] Už máš řidičák!");//posle zprávu že již má řidičák }else{//když tyto podmínky splnuje GivePlayerMoney(playerid,-2000); SendClientMessage(playerid,COLOR_BLUE,"[ ! ] Projiždej Cheackpointy!");//posle zprávu že dělá test SetPlayerCheckpoint(playerid,1,1,1,7.0);//Nastaví checkpoint autoskolacar = CreateVehicle(520,1,1,1,1, random(100), random(100), 1000); // Vytvorí auto PutPlayerInVehicle(playerid, autoskolacar,0); autoskola[playerid] = Check2;//a když do něj vejde, přejde na další } } } } return 1; } stock PlayerName(playerid) { new name[255]; GetPlayerName(playerid, name, 255); return name; } Pozície, pickupu, checkpointov, kde som dal 1,1,1 si uprav, na tvoje pozície Netestoval som to, ale dúfam že to bude fungovať Link to comment Share on other sites More sharing options...
0 ErionX 2 Odesláno: 28. Červenec, 2012 Author Share Odesláno: 28. Červenec, 2012 GiGi ano funguje mi to ale jak kliknu na Udělat test tak mě to portne někam do pr .... žádný auto se mi nevytvoří tak jsem dal /ecar hydra doletěl tam kde mám řidičák a checkpointy fungovali v pohodě Takže jenom opravit create vehicle + port do auta Což netuším jak Link to comment Share on other sites More sharing options...
0 GiGi 0 Odesláno: 28. Červenec, 2012 Share Odesláno: 28. Červenec, 2012 Takto by to malo byť: autoskolacar = CreateVehicle(560, 213.8, 1872.3 ,13.2,0 , random(100), random(100), 1000); // Vytvorí vozidlo (v našom prípade SULTAN), PutPlayerInVehicle(playerid, autoskolacar,0); // Toto ho dá do vozidla A malo by to ísť Som to testoval Ale nezabudni zmeniť tie súradnice na tvoje , inak sa objavíš v Arei 69 Link to comment Share on other sites More sharing options...
0 ErionX 2 Odesláno: 28. Červenec, 2012 Author Share Odesláno: 28. Červenec, 2012 No právě jsem se oběvoval na farmě aha tam mám dát souřadnice ? Ops Link to comment Share on other sites More sharing options...
0 ErionX 2 Odesláno: 28. Červenec, 2012 Author Share Odesláno: 28. Červenec, 2012 Vyřešeno můžete LOCK ! Děkuji GiGi Link to comment Share on other sites More sharing options...
Dotaz
ErionX 2
Zdravim mám takový problém skusil jsem si udělat do modu Řidičák s checkpointy podle tohodle návodu V2
idicak-s-checkpointy-t5725.html
Ale mám 5 Errorů
error 017: undefined symbol "Current"
error 017: undefined symbol "Ridicak"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Errory jsou na těchto řádcích
if (Current == tvemenu ) {
else if (Ridicak[playerid] == 1) {// ze už má řidičák
V pawno jsem začátečník ... Proto potřebuji help + menší vysvětlení
Link to comment
Share on other sites
15 odpovědí na tuto otázku
Recommended Posts