SA-MP Forums Archive
Help me - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me (/showthread.php?tid=278920)



Help me - Mantas7776 - 24.08.2011

C:\Users\Mantas\Downloads\samp03csvr_R2-2_win32\gamemodes\testas.pwn(232) : warning 217: loose indentation
C:\Users\Mantas\Downloads\samp03csvr_R2-2_win32\gamemodes\testas.pwn(232) : error 027: invalid character constant
C:\Users\Mantas\Downloads\samp03csvr_R2-2_win32\gamemodes\testas.pwn(232) : error 017: undefined symbol "ass"
C:\Users\Mantas\Downloads\samp03csvr_R2-2_win32\gamemodes\testas.pwn(232) : error 029: invalid expression, assumed zero
C:\Users\Mantas\Downloads\samp03csvr_R2-2_win32\gamemodes\testas.pwn(232) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


[pawno]
227 public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
228 {
229 if(dialogid == 1 && response == 1)
230{
231 new string[128];
232 if (inputtext[0] == 'pass') {
233 SendClientMessage(playerid,0xAA3333AA,"Hydra ispawninta");
lektu = CreateVehicle(520,-2243,489,74,90,-1,-1,-1);
}
else if (inputtext[0] != 'pass') {
SendClientMessage(playerid,0xAA3333AA,"Slaptazodis blogas!");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Koks slaptaюodis?", "Koks slaptaюodis?", "Spawn", "Atsaukti");
}
}
return 1;
}
[/pawno]


Re: Help me - =WoR=G4M3Ov3r - 24.08.2011

Why are you copy pasting ?O.o its gonna keep on giving you errors, you need all the necessary defines and forwards, and new, and perhaps an include from the GM you're stripping them from.


Re: Help me - Mantas7776 - 24.08.2011

http://paste.org/pastebin/view/37561


Re: Help me - AndreT - 24.08.2011

That's not how you compare strings in PAWN!
You could do this:
pawn Code:
if(inputtext[0] = 'p')
, but not
pawn Code:
if(inputtext[0] == 'pass')
That is completely wrong!

Do this instead:
pawn Code:
if(!strcmp(inputtext, "pass", true))
{
    // inputtext is same as pass!
}



Re : Help me - Naruto_Emilio - 24.08.2011

pawn Code:
C:\Users\Mantas\Downloads\samp03csvr_R2-2_win32\gamemodes\testas.pwn(232) : error 017: undefined symbol "ass"
Delet all the ass symbol so then it will be: if(inputtext[0] = 'p').

OT:Hahah ass xD