SA-MP Wiki Bugged
#1

In this page https://sampwiki.blast.hk/wiki/Fread
there is error -

public OnGameModeInit()
{
new string[64]; // Create the string to store the read text in
new File:example = fopen("Startup.txt", io_read); // Open the file
while(fread(example, string)) //reads the file line-by-line
{
if(strcmp(string, "Ban", true) == 0) //if any of the lines in the file say "Ban" the system will ban the player
{
Ban(playerid); //bans the player
}
}
fclose(example);
return 1;
}

must be

public OnPlayerConnect(playerid)
{
new string[64]; // Create the string to store the read text in
new File:example = fopen("Startup.txt", io_read); // Open the file
while(fread(example, string)) //reads the file line-by-line
{
if(strcmp(string, "Ban", true) == 0) //if any of the lines in the file say "Ban" the system will ban the player
{
Ban(playerid); //bans the player
}
}
fclose(example);
return 1;
}
Reply
#2

There's a lot of faulty/diffuse information on the wiki. :\
Reply
#3

Anyone who registers on SA-MP wiki can edit and create pages.

You can fix them also.
Reply
#4

Quote:
Originally Posted by Karlip
Посмотреть сообщение
Anyone who registers on SA-MP wiki can edit and create pages.

You can fix them also.
Problem is, I can't register lol..
Reply
#5

Registration was closed due to people abusing their powers and posting bad pictures.

Note: I edited that article, check it out.
Reply
#6

Some examples can be bad (like the Fread and OnGameModeInit) but they are made for show you how does the function works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)