SA-MP Forums Archive
[Help] Compile error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Compile error (/showthread.php?tid=179479)



[Help] Compile error - jason121 - 27.09.2010

Well i am putting A map code under Public OngameModeInIt() and i get this error

C:\Users\User\Desktop\ser 0.3\gamemodes\larp.pwn(19589) : warning 217: loose indentation
C:\Users\User\Desktop\ser 0.3\gamemodes\larp.pwn(19647) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

How can i get this to stop.

Please Assist me.


Re: [Help] Compile error - Backwardsman97 - 27.09.2010

It just means you didn't indent properly. It won't affect anything but you should indent correctly.


Re: [Help] Compile error - iFriSki - 27.09.2010

Let's assume the following code is yours, for your map.

pawn Код:
public OnFilterScriptInit()
{
    SendClientMessageToAll(COLOR_DBLUE,"Object.amx has been loaded.");
//--------------------------------[RANDOM OBJECTS THROUGHOUT LS]-----------------------------------------
    CreateDynamicObject(12990, 2914.639648, -2066.244385, 2.281558, 0.0000, 0.0000, 90.0000);
    CreateDynamicObject(12990, 2914.635498, -2038.903809, 2.228707, 0.0000, 0.0000, 90.0000);
    CreateDynamicObject(12990, 2914.738037, -2025.653320, 2.203705, 0.0000, 0.0000, 90.0000);
    CreateDynamicObject(12990, 2914.602295, -2082.910645, 2.306895, 0.0000, 0.0000, 90.0000);
    CreateDynamicObject(10783, 447.046570, -2724.913086, -34.928955, 0.0000, 0.0000, 0.0000);
    CreateDynamicObject(987, 417.657654, -2744.687744, -38.805725, 0.0000, 0.0000, 269.5183);
    CreateDynamicObject(987, 457.370636, -2764.236816, -38.499268, 0.0000, 0.0000, 0.5148);
    CreateDynamicObject(987, 469.971497, -2672.481689, -38.750000, 0.0000, 0.0000, 180.1369); // Under water thing
    CreateDynamicObject(982, 1608.087769, -1625.145752, 16.580629, 0.0000,

... Skipping ahead here ...
    CreateDynamicObject(2921, 2785.3195800781, -1416.5737304688, 19.107503890991, 0, 0, 189.99996948242);
    CreateDynamicObject(2921, 2747.7045898438, -1423.3742675781, 25.171142578125, 0, 0, 199.99996948242);
    CreateDynamicObject(2921, 2826.328125, -1423.8139648438, 18.663555145264, 0, 0, 0);
    CreateDynamicObject(1766, 2812.4125976563, -1415.4294433594, 15.25, 0, 0, 358);
    CreateDynamicObject(1764, 2800.2995605469, -1424.1048583984, 15.25, 0, 0, 178);
    CreateDynamicObject(2744, 2787.1337890625, -1425.7141113281, 18.342723846436, 0, 0, 251.99993896484);
    CreateDynamicObject(1224, 2787.3354492188, -1425.4888916016, 15.86491394043, 0, 0, 0);
    return 1;
}
Basically make everything line up with each other. When a bracket comes along, indent once for the next line. When closing it, indent back one so they line up.


Re: [Help] Compile error - jason121 - 27.09.2010

See im just a beginner at scripting So Have you got teamviewer If you Do show us that way please.
It has Affected My Server, Because It wont come up it just says,
Connecting to 127.0.0.1
unable to connect to Server, Retrying


Re: [Help] Compile error - Retardedwolf - 27.09.2010

http://dracoblue.net/tidy/pawn/


Paste your code in there and copy the outputted version. It should fix your indentation errors


Re: [Help] Compile error - jason121 - 27.09.2010

I am still getting this Error Retardedwolf
C:\Users\User\Desktop\ser 0.3\gamemodes\larp.pwn(19589) : warning 217: loose indentation
C:\Users\User\Desktop\ser 0.3\gamemodes\larp.pwn(1964 : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.


Re: [Help] Compile error - Retardedwolf - 27.09.2010

Did you copy the correct outputted version and compiled it?


Re: [Help] Compile error - [HiC]TheKiller - 27.09.2010

If you still are getting that error then put this at the top of your script

pawn Код:
#pragma tabsize 0



Re: [Help] Compile error - Rachael - 27.09.2010

#pragma tabsize 0 is the fools way out, it does not fix the problem, merely stops the warnings being printed. If you go through your code and ensure all of your indentations are correct you will learn more, and feel better about yourself.