Loose Identitation Warning + REP
#1

forward lang_en(playerid);
public lang_en(playerid)
{
new string[128];
SendClientMessage(playerid, COLOR_ORANGE, "-----------------------------------------------------------------------------------------------------------------------"); // WARNING LINE!!
format(string, sizeof(string), "Welcome %s, to xTreme Evolution Freeroam Gaming!", PlayerName2(playerid));
SendClientMessage(playerid, lightgreen, string);
SendClientMessage(playerid, lightgreen, "You have been given $60000 starting money since you have no saved money as of yet!");
SendClientMessage(playerid, lightgreen, "You can register your current player name with '/register [password]'");
SendClientMessage(playerid, lightgreen, "You must register and login to gain access to money, bank and vehicle saving options!");
SendClientMessage(playerid, lightgreen, "Type /cmds to get started and type /credits for a list of people who contributed.");
SendClientMessage(playerid, COLOR_ORANGE, "-----------------------------------------------------------------------------------------------------------------------");
return GivePlayerMoney(playerid,60000);
}

How to fix this?

Thanks to all,
Rodri.
Reply
#2

Basically loose indentation means that your code is not nested.

pawn Код:
forward lang_en(playerid);
public lang_en(playerid)
{
    new string[128];
    SendClientMessage(playerid, COLOR_ORANGE, "-----------------------------------------------------------------------------------------------------------------------");
    format(string, sizeof(string), "Welcome %s, to xTreme Evolution Freeroam Gaming!", PlayerName2(playerid));
    SendClientMessage(playerid, lightgreen, string);
    SendClientMessage(playerid, lightgreen, "You have been given $60000 starting money since you have no saved money as of yet!");
    SendClientMessage(playerid, lightgreen, "You can register your current player name with '/register [password]'");
    SendClientMessage(playerid, lightgreen, "You must register and login to gain access to money, bank and vehicle saving options!");
    SendClientMessage(playerid, lightgreen, "Type /cmds to get started and type /credits for a list of people who contributed.");
    SendClientMessage(playerid, COLOR_ORANGE, "-----------------------------------------------------------------------------------------------------------------------");
    return GivePlayerMoney(playerid,60000);
}
Reply
#3

But nothing changed on your code than mine?
Reply
#4

I added indentation, this is basically tabbing / nesting your code.

This small gap on each line within your public is known as nesting and should remove the error you're getting.

Reply
#5

https://en.wikipedia.org/wiki/Indent_style

No, nothing really changed between the code Stuart posted and yours, however, Stuart's is actually readable.
Reply
#6

So your code should look like:
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)