mura Posted July 3, 2011 Posted July 3, 2011 Deci imi da o eroare la compilare.D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentationPawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase1 Warning.Am pus asa:ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");sipublic OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs. { case 1:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -1); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); } case 1: // The second item listed { if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -2); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); } case 2: // The third item listed { if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -3); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); } } } } } return 1;}
Ryder_RO Posted July 3, 2011 Posted July 3, 2011 nu e o eroare e un warningscapi de el prin urmatoarele ori unde ai pragma pui#pragma tabsize 0saute duci la linia 283 si o faci cum trebuie (as faceo eu dar nush care e:))]
mura Posted July 3, 2011 Author Posted July 3, 2011 nu am inteles absolut nimic :-s...ce pragma? (nu exista linia 283)
IstuntmanI Posted July 3, 2011 Posted July 3, 2011 nu am inteles absolut nimic :-s...ce pragma?pragma are mai multe optiuni, printre care si tabsize, cu el poti scapa de orice avertizare cu "loose identitation" din script punand sus in script#pragma tabsize 0
mura Posted July 3, 2011 Author Posted July 3, 2011 am vrut sa pun lapublic OnPlayerEnterCheckpoint(playerid){ ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel"); DisablePlayerCheckpoint(playerid); return 1;} asta.Nu mere cand intra in chekpoint apare dialogul dar cand dau click nu se int nik
xxSPEEDYxx Posted July 3, 2011 Posted July 3, 2011 am vrut sa pun lapublic OnPlayerEnterCheckpoint(playerid){ ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel"); DisablePlayerCheckpoint(playerid); return 1;} astace dreq ii asta? ti s-a spus rezolvarea TC!... Fara reclama in semnatura!
mura Posted July 3, 2011 Author Posted July 3, 2011 pai aia am pus pt dialog..Eu am pus un checkpoint si cand intra in checkpoint sa-i apara dialog-ul ala.Cand intri in checkpoint apare meniul cu alea dar cand dai click nu se int nik..eroarea doar dispare no si rezolva
Ryder_RO Posted July 3, 2011 Posted July 3, 2011 am vrut sa pun lapublic OnPlayerEnterCheckpoint(playerid){ ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel"); DisablePlayerCheckpoint(playerid); return 1;} astaSus in script#define menu1 25 la OnPlayerEnterCheckpoint pui asta ShowPlayerDialog(playerid, menu1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel"); la OnDialogResponse ... pui if(dialogid==menu1) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs. { case 1:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -1); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); } case 1: // The second item listed { if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -2); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); } case 2: // The third item listed { if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -3); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); } } } } } return 1; }daca nici acu nu intelegi
mura Posted July 3, 2011 Author Posted July 3, 2011 am facut exact asa siD:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentationPawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase1 Warning.si daca pun aia cu pragma doar dispare problema..pentru ca, cand intru in checkpoint apare meniul dar cand da click nu se int nik
IstuntmanI Posted July 3, 2011 Posted July 3, 2011 am facut exact asa siD:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentationPawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase1 Warning.si daca pun aia cu pragma doar dispare problema..pentru ca, cand intru in checkpoint apare meniul dar cand da click nu se int nikDeci ... sus in script pui#pragma tabsize 0Asta e sa nu mai dea warnuri cu "loose indentation", nu are legatura cu checkpointul sau meniul, meniul nu merge pentru ca trebuie schimbat ID-ul lui.
xxSPEEDYxx Posted July 3, 2011 Posted July 3, 2011 schimba id-ul dialogului lmenu in 1200 asa daca nu stii:#define menu1 12000 Fara reclama in semnatura!
Ryder_RO Posted July 3, 2011 Posted July 3, 2011 am facut exact asa siD:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentationPawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase1 Warning.si daca pun aia cu pragma doar dispare problema..pentru ca, cand intru in checkpoint apare meniul dar cand da click nu se int nik1).#pragma tabsize 0 (cum a zis si stuntman 2).pune asta la ondialogresponse (schimbo cu care ai puso inainte)if(dialogid==menu1) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs. { case 1:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -1); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); } case 1: // The second item listed { if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -2); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); } case 2: // The third item listed { if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -3); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); } } } } } return 1; }
mura Posted July 3, 2011 Author Posted July 3, 2011 D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(255) : error 017: undefined symbol "menu1"D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(287) : warning 217: loose indentationD:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(290) : error 029: invalid expression, assumed zeroD:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(290) : error 004: function "OnPlayerClickPlayer" is not implementedD:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(294) : error 030: compound statement not closed at the end of file (started at line 255)Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase4 Errors.
Ryder_RO Posted July 3, 2011 Posted July 3, 2011 u trb doar sa schimbi ce ai pus inainte la ondialogresponse cu ce tiam dat mai sus Sus in script#define menu1 25 la OnPlayerEnterCheckpoint pui asta ShowPlayerDialog(playerid, menu1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel"); OnDialogResponse if(dialogid==menu1) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs. { case 1:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -1); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); } case 1: // The second item listed { if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -2); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); } case 2: // The third item listed { if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -3); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); } } } } } return 1; } Hai ca deja facem OFFTopic
Ryder_RO Posted July 3, 2011 Posted July 3, 2011 am pus..si alte erori :|le-am pus mai susai pus unde ai DEFINE #define menu1 255
IstuntmanI Posted July 3, 2011 Posted July 3, 2011 Daca nu vrei sa pricepi asta e, oi vrea sa intram la tine in PC sa vedem ce porcarii faci tu, mai incearca si merge 100%, e bine cum am zis eu si cu Ryder_RO.Tu vrei sa-ti spunem exact unde sa pui ? Dupa linia ... pui ... (parca stim noi cum ai tu GM), da-ti si tu seama. Nu suport cand va vad asa. Am fost si eu incepator, dar nu chiar asa... (nu am tinut-o mult asa cel putin)/locked
Question
mura
Deci imi da o eroare la compilare.
D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Am pus asa:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
si
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -1);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
case 1: // The second item listed
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -2);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
}
case 2: // The third item listed
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -3);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
}
}
}
}
}
return 1;
}
16 answers to this question
Recommended Posts