SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 20/10/2010, 11:08 AM   #1
Rapgangsta
Huge Clucker
 
Join Date: Sep 2009
Location: Italy
Posts: 228
Reputation: 15
Default SA-MP Wiki Bugged

In this page http://wiki.sa-mp.com/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;
}
Rapgangsta is offline  
Old 20/10/2010, 11:18 AM   #2
Slice
High-roller
 
Slice's Avatar
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,854
Reputation: 1231
Default Re: SA-MP Wiki Bugged

There's a lot of faulty/diffuse information on the wiki. :\
__________________
Do you like SA-MP and DayZ? Come play both: ulclan.com:1421

Do you use any scripts I've made?
Star them on GitHub or reply in their topics so I know what I should keep working on!
Slice is offline  
Old 20/10/2010, 01:06 PM   #3
Karlip
High-roller
 
Join Date: Oct 2007
Location: Click To Show
Posts: 1,884
Reputation: 100
Default Re: SA-MP Wiki Bugged

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

You can fix them also.
__________________
Karlip is offline  
Old 20/10/2010, 03:04 PM   #4
rbN.
Banned
 
Join Date: Jan 2010
Location: fissa
Posts: 1,639
Reputation: 289
Default Re: SA-MP Wiki Bugged

Quote:
Originally Posted by Karlip View Post
Anyone who registers on SA-MP wiki can edit and create pages.

You can fix them also.
Problem is, I can't register lol..
rbN. is offline  
Old 20/10/2010, 03:42 PM   #5
Miguel
High-roller
 
Miguel's Avatar
 
Join Date: Dec 2009
Posts: 1,581
Reputation: 23
Default Re: SA-MP Wiki Bugged

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

Note: I edited that article, check it out.
Miguel is offline  
Old 20/10/2010, 09:49 PM   #6
MrDeath537
High-roller
 
Join Date: Nov 2009
Location: Argentina
Posts: 2,082
Reputation: 29
Default Respuesta: SA-MP Wiki Bugged

Some examples can be bad (like the Fread and OnGameModeInit) but they are made for show you how does the function works.
__________________
Trabajando en 3 includes, ny_INI, ny_XML y ny_Handling.
MrDeath537 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concerning the wiki. Daren_Jacobson General 2 17/08/2010 03:58 PM
PAWNcompiler bugged or PAWNO bugged? Gamer_Z Help Archive 6 06/08/2010 09:02 AM
The sa-mp wiki thecutkiller Help Archive 4 05/01/2010 02:52 PM
[WIKI] How am i able to add information to the Sa-Mp Wiki? Carlos_Leone General 3 28/03/2009 01:53 PM
The wiki Streetplaya General 1 04/02/2009 04:39 PM


All times are GMT. The time now is 07:05 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.