PDA

View Full Version : Pls help me with mdc


kevi11
26/02/2016, 01:28 PM
Script http://pastebin.com/6TsU0ZBv

Error pls help me

C:\Users\ke\Desktop\Deathmatch sampè\pawno\include\zcmd.inc(96) : warning 217: loose indentation
C:\Users\ke\Desktop\Deathmatch sampè\pawno\include\zcmd.inc(97) : warning 217: loose indentation
C:\Users\ke\Desktop\Deathmatch sampè\pawno\include\zcmd.inc(98) : warning 217: loose indentation
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(10) : error 017: undefined symbol "Textdraw0"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(11) : error 017: undefined symbol "Textdraw1"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(12) : error 017: undefined symbol "Textdraw2"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(13) : error 017: undefined symbol "Textdraw3"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(14) : error 017: undefined symbol "Textdraw4"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(15) : error 017: undefined symbol "Textdraw5"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(16) : error 017: undefined symbol "Textdraw6"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(17) : error 017: undefined symbol "Textdraw7"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(18) : error 017: undefined symbol "Textdraw8"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(19) : error 017: undefined symbol "Textdraw9"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(20) : error 017: undefined symbol "Textdraw10"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(21) : error 017: undefined symbol "Textdraw11"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(22) : error 017: undefined symbol "Textdraw12"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(23) : error 017: undefined symbol "Textdraw13"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(24) : error 017: undefined symbol "Textdraw14"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(36) : error 017: undefined symbol "Textdraw0"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(36) : error 017: undefined symbol "playerid"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(36) : error 029: invalid expression, assumed zero
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(36) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


19 Errors.

Virtual1ty
26/02/2016, 01:32 PM
Indent the code + remove duplicate code and define (declare) the variables.
All easy to do if you've read the Scripting basics (https://wiki.sa-mp.com/wiki/Scripting_Basics) and know how to program.

kevi11
26/02/2016, 01:48 PM
C:\Users\ke\Desktop\Deathmatch sampè\pawno\include\zcmd.inc(96) : warning 217: loose indentation
C:\Users\ke\Desktop\Deathmatch sampè\pawno\include\zcmd.inc(97) : warning 217: loose indentation
C:\Users\ke\Desktop\Deathmatch sampè\pawno\include\zcmd.inc(98) : warning 217: loose indentation
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(17) : error 017: undefined symbol "Textdraw0"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(17) : error 017: undefined symbol "playerid"
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(17) : error 029: invalid expression, assumed zero
C:\Users\ke\Desktop\Deathmatch sampè\gamemodes\mdc.pwn(17) : fatal error 107: too many error messages on one line

Virtual1ty
26/02/2016, 01:52 PM
Please use the code tags to paste code:

print("\n--------------------------------------");
print(" MDC Textdraw - Jeremy Peterson");
print("--------------------------------------\n");
Textdraw0[playerid] = TextDrawCreate(89.000000, 112.437500, "LD_SPAC:white");
The red part shouldn't be there. OnFilterScriptInit() (https://wiki.sa-mp.com/wiki/OnFilterScriptInit) callback has no playerid parameter.

kevi11
26/02/2016, 02:34 PM
don't go man if u want u can insert to me mdc.pawn fixed.

Trevor19012
26/02/2016, 02:56 PM
This should help you.

http://wiki.sa-mp.com/wiki/Textdraw

CodeStyle175
26/02/2016, 02:57 PM
kevi11, what is wrong with you, you dont understand nothing about scripting...

CodeStyle175
26/02/2016, 03:04 PM
#include <a_samp>
#include <zcmd>
new Text:Textdraw[15];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" MDC Textdraw - Jeremy Peterson");
print("--------------------------------------\n");
Textdraw[0] = TextDrawCreate(89.000000, 112.437500, "LD_SPAC:white");
TextDrawLetterSize(Textdraw[0], 0.000000, 0.000000);
TextDrawTextSize(Textdraw[0], 475.000000, 225.312500);
TextDrawAlignment(Textdraw[0], 1);
TextDrawColor(Textdraw[0], 421085354);
TextDrawSetShadow(Textdraw[0], 0);
TextDrawSetOutline(Textdraw[0], 0);
TextDrawFont(Textdraw[0], 4);

Textdraw[1] = TextDrawCreate(89.000000, 144.375000, "LD_SPAC:white");
TextDrawLetterSize(Textdraw[1], 0.000000, 0.000000);
TextDrawTextSize(Textdraw[1], 475.500000, 4.375000);
TextDrawAlignment(Textdraw[1], 1);
TextDrawColor(Textdraw[1], -5963521);
TextDrawSetShadow(Textdraw[1], 0);
TextDrawSetOutline(Textdraw[1], 0);
TextDrawFont(Textdraw[1], 4);

Textdraw[2] = TextDrawCreate(89.000000, 290.937500, "LD_SPAC:white");
TextDrawLetterSize(Textdraw[2], 0.000000, 0.000000);
TextDrawTextSize(Textdraw[2], 475.000000, 4.812500);
TextDrawAlignment(Textdraw[2], 1);
TextDrawColor(Textdraw[2], -5963521);
TextDrawSetShadow(Textdraw[2], 0);
TextDrawSetOutline(Textdraw[2], 0);
TextDrawFont(Textdraw[2], 4);

Textdraw[3] = TextDrawCreate(195.500000, 121.625000, "Police Department");
TextDrawLetterSize(Textdraw[3], 0.683499, 1.595625);
TextDrawAlignment(Textdraw[3], 1);
TextDrawColor(Textdraw[3], -1);
TextDrawSetShadow(Textdraw[3], 0);
TextDrawSetOutline(Textdraw[3], 1);
TextDrawBackgroundColor(Textdraw[3], 51);
TextDrawFont(Textdraw[3], 2);
TextDrawSetProportional(Textdraw[3], 1);

Textdraw[4] = TextDrawCreate(123.500000, 154.000000, "NAME");
TextDrawLetterSize(Textdraw[4], 0.551499, 1.704999);
TextDrawAlignment(Textdraw[4], 1);
TextDrawColor(Textdraw[4], -5963521);
TextDrawSetShadow(Textdraw[4], 0);
TextDrawSetOutline(Textdraw[4], 1);
TextDrawBackgroundColor(Textdraw[4], 51);
TextDrawFont(Textdraw[4], 2);
TextDrawSetProportional(Textdraw[4], 1);

Textdraw[5] = TextDrawCreate(122.500000, 197.312500, "LOCATION");
TextDrawLetterSize(Textdraw[5], 0.499499, 1.683124);
TextDrawAlignment(Textdraw[5], 1);
TextDrawColor(Textdraw[5], -5963521);
TextDrawSetShadow(Textdraw[5], 0);
TextDrawSetOutline(Textdraw[5], 1);
TextDrawBackgroundColor(Textdraw[5], 51);
TextDrawFont(Textdraw[5], 2);
TextDrawSetProportional(Textdraw[5], 1);

Textdraw[6] = TextDrawCreate(120.500000, 242.375000, "WANTED FOR");
TextDrawLetterSize(Textdraw[6], 0.513000, 1.656874);
TextDrawAlignment(Textdraw[6], 1);
TextDrawColor(Textdraw[6], -5963521);
TextDrawSetShadow(Textdraw[6], 0);
TextDrawSetOutline(Textdraw[6], 1);
TextDrawBackgroundColor(Textdraw[6], 51);
TextDrawFont(Textdraw[6], 2);
TextDrawSetProportional(Textdraw[6], 1);

Textdraw[7] = TextDrawCreate(124.000000, 175.000000, "EDIT IT");
TextDrawLetterSize(Textdraw[7], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[7], 1);
TextDrawColor(Textdraw[7], -1);
TextDrawSetShadow(Textdraw[7], 0);
TextDrawSetOutline(Textdraw[7], 1);
TextDrawBackgroundColor(Textdraw[7], 51);
TextDrawFont(Textdraw[7], 1);
TextDrawSetProportional(Textdraw[7], 1);

Textdraw[8] = TextDrawCreate(511.500000, 272.125000, "Close");
TextDrawLetterSize(Textdraw[8], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[8], 1);
TextDrawColor(Textdraw[8], -1);
TextDrawSetShadow(Textdraw[8], 0);
TextDrawSetOutline(Textdraw[8], 1);
TextDrawBackgroundColor(Textdraw[8], 51);
TextDrawFont(Textdraw[8], 1);
TextDrawSetProportional(Textdraw[8], 1);

Textdraw[9] = TextDrawCreate(123.500000, 219.625000, "EDIT IT");
TextDrawLetterSize(Textdraw[9], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[9], 1);
TextDrawColor(Textdraw[9], -1);
TextDrawSetShadow(Textdraw[9], 0);
TextDrawSetOutline(Textdraw[9], 1);
TextDrawBackgroundColor(Textdraw[9], 51);
TextDrawFont(Textdraw[9], 1);
TextDrawSetProportional(Textdraw[9], 1);

Textdraw[10] = TextDrawCreate(123.000000, 265.125000, "EDIT IT");
TextDrawLetterSize(Textdraw[10], 0.449999, 1.600000);
TextDrawAlignment(Textdraw[10], 1);
TextDrawColor(Textdraw[10], -1);
TextDrawSetShadow(Textdraw[10], 0);
TextDrawSetOutline(Textdraw[10], 1);
TextDrawBackgroundColor(Textdraw[10], 51);
TextDrawFont(Textdraw[10], 1);
TextDrawSetProportional(Textdraw[10], 1);

Textdraw[11] = TextDrawCreate(101.000000, 156.187500, "~>~");
TextDrawLetterSize(Textdraw[11], 0.310000, 1.175626);
TextDrawAlignment(Textdraw[11], 1);
TextDrawColor(Textdraw[11], -1);
TextDrawSetShadow(Textdraw[11], 0);
TextDrawSetOutline(Textdraw[11], 0);
TextDrawBackgroundColor(Textdraw[11], 51);
TextDrawFont(Textdraw[11], 1);
TextDrawSetProportional(Textdraw[11], 1);

Textdraw[12] = TextDrawCreate(101.500000, 112.437500, "LD_SPAC:white");
TextDrawLetterSize(Textdraw[12], 0.000000, 0.000000);
TextDrawTextSize(Textdraw[12], 8.500000, 6.125000);
TextDrawAlignment(Textdraw[12], 1);
TextDrawColor(Textdraw[12], 8388863);
TextDrawSetShadow(Textdraw[12], 0);
TextDrawSetOutline(Textdraw[12], 0);
TextDrawFont(Textdraw[12], 4);

Textdraw[13] = TextDrawCreate(364.000000, 164.500000, "LD_SPAC:white");
TextDrawLetterSize(Textdraw[13], 0.000000, 0.000000);
TextDrawTextSize(Textdraw[13], 128.500000, 119.875000);
TextDrawAlignment(Textdraw[13], 1);
TextDrawColor(Textdraw[13], -5963521);
TextDrawSetShadow(Textdraw[13], 0);
TextDrawSetOutline(Textdraw[13], 0);
TextDrawFont(Textdraw[13], 4);

Textdraw[14] = TextDrawCreate(368.500000, 170.625000, "LD_SPAC:white");
TextDrawLetterSize(Textdraw[14], 0.000000, 0.000000);
TextDrawTextSize(Textdraw[14], 118.000000, 108.500000);
TextDrawAlignment(Textdraw[14], 1);
TextDrawColor(Textdraw[14], -1378294017);
TextDrawSetShadow(Textdraw[14], 0);
TextDrawSetOutline(Textdraw[14], 0);
TextDrawFont(Textdraw[14], 4);
return 1;
}
CMD:mdcplayersearch(playerid)
{
for(new i; i < 15; i++)TextDrawShowForPlayer(playerid,Textdraw[i]);
return 1;
}

CodeStyle175
26/02/2016, 03:06 PM
there