SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 02/09/2009, 08:35 AM   #1
Dabombber
Big Clucker
 
Join Date: May 2006
Posts: 81
Reputation: 1
Default Bugs (1st thread RC3-RC6)

From what I've seen most of the bugs from 0.2 are still here, plus some additional bugs in the new features.

Bugs:
  • The default gamemode assumes people in spec are selecting their city
  • AllowPlayerTeleport() doesn't work
  • strins still has buffer overflows
  • strval doesn't seem to crash anymore for long string but returns the wrong value (0)
  • floatstr returns 0.0 for long strings
  • valstr(string, cellmax) causes an infinite loop
  • StartRecordingPlayerData can save files anywhere (..\..\test)

About the bots, it would be useful if there was some way to communicate with them from filterscripts, then we'd be able to save race records and play them back and stuff like that. Recordings should be saved to the npcmodes folder, they're useless in the scriptfiles folder (not that it really matters because setting the location to "..\\npcmodes\\recordings\\file" works).

[b]ONLY REPORT BUGS HERE, ALL OTHER POSTS WILL BE REMOVED[b]
Dabombber is offline  
Old 02/09/2009, 08:42 AM   #2
Baff
Huge Clucker
 
Baff's Avatar
 
Join Date: Jun 2008
Posts: 320
Reputation: 1
Default Re: Bugs

also when you exit the car(i tryed it with 2 skins) and keeping key SPACE pressed you exit the car and the car just 'turns on' and goes forward for like 10 meter's and the camera is following it...and when it stops the camera sets back on your character :S
__________________
Baff is offline  
Old 02/09/2009, 08:42 AM   #3
Kalcor
SA-MP Developer
 
Join Date: Apr 2005
Posts: 981
Reputation: 2727
Default Re: Bugs

Quote:
Originally Posted by Dabombber
  • The default gamemode assumes people in spec are selecting their city
Correct. If you need additional spectator mode you would have to change this script.

Quote:
  • AllowPlayerTeleport() doesn't work
Correct. AllowPlayerTeleport only works if AllowAdminTeleport is enabled.

Quote:
  • strins still has buffer overflows
More info?

Quote:
  • strval doesn't seem to crash anymore for long string but returns the wrong value (0)
Correct. It can't process big numbers. There are limits on integers in pawn.

Quote:
  • StartRecordingPlayerData can save files anywhere (..\..\test)
That is a legit problem bug that needs to be fixed. Thanks for reporting.
Kalcor is offline  
Old 02/09/2009, 09:03 AM   #4
Dabombber
Big Clucker
 
Join Date: May 2006
Posts: 81
Reputation: 1
Default Re: Bugs

Quote:
Originally Posted by Kye
Correct. If you need additional spectator mode you would have to change this script.
If that's intentional then... ok. Why does it use OnPlayerUpdate instead of OnPlayerStateChange though, isn't that encouraging bad practice?

Quote:
Originally Posted by Kye
Correct. AllowPlayerTeleport only works if AllowAdminTeleport is enabled.
Once again is this intentional? It doesn't seem like a particularly useful feature. I realise that in most cases if a player can teleport then an admin can too, but this assumes admins are using RCON which is not always the case.

Quote:
Originally Posted by Kye
More info?
pawn Code:
new string[] = ":(";
    strins(string, ">", 0);
    print(string);
will crash the script


Quote:
Originally Posted by Kye
Correct. It can't process big numbers. There are limits on integers in pawn.
Not exactly the problem I was mentioning for example
pawn Code:
strval("123aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
will return 0, while
pawn Code:
strval("123aaa")
will return 123, which is inconsistent. This is the same bug that floatstr has.
Dabombber is offline  
Old 02/09/2009, 09:15 AM   #5
Google63
Big Clucker
 
Join Date: Jun 2008
Posts: 130
Reputation: 0
Default Re: Bugs

I think strval has internal isNumeric function and it will be logical to process only numbers
Also it first get string length then do check for max length and then process
Google63 is offline  
Old 02/09/2009, 09:43 AM   #6
Westie
Gangsta
 
Westie's Avatar
 
Join Date: Jul 2009
Posts: 858
Reputation: 63
Default Re: Bugs

#strins buffer overflow
pawn Code:
new string[] = ":(";
strins(string, ">", 0);
print(string);

Isn't this a good thing? It gives you, as the coder, an idea on how to deal with strings, etc. For example, if there's part of a string missing (that you need), unintentional things *might* happen. I'd rather have a crash instead of unintentional behaviour.
Westie is offline  
Old 02/09/2009, 10:23 AM   #7
Dabombber
Big Clucker
 
Join Date: May 2006
Posts: 81
Reputation: 1
Default Re: Bugs

Quote:
Originally Posted by /^We(stie|z+[e|a
r)$/ ]
#strins buffer overflow
pawn Code:
new string[] = ":(";
strins(string, ">", 0);
print(string);

Isn't this a good thing? It gives you, as the coder, an idea on how to deal with strings, etc. For example, if there's part of a string missing (that you need), unintentional things *might* happen. I'd rather have a crash instead of unintentional behaviour.
I think crashing is undesirable, if you need the string to be valid then you will have some other method of checking it rather than hoping the script will crash if it's too long. Besides the function has a maxlength parameter, so you would expect it to not overflow.
pawn Code:
native bool: strins(string[], const substr[], pos, maxlength=sizeof string);

Consider something like
pawn Code:
strreplace(string, "1", "one");
which is better: the string being truncated, or the script crashing?

EDIT: oh god, why is this still here
pawn Code:
// Take Cover
    if (strcmp("/hide", cmdtext, true, 3) == 0) {
        LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
        return 1;
    }
Dabombber is offline  
Old 02/09/2009, 11:57 AM   #8
doughboy7
Little Clucker
 
Join Date: Jan 2008
Posts: 3
Reputation: 0
Default Re: 0.3 Bug report

While playing the new release beta, Ive noticed when you exit a car and press and hold forward+sprint you exit the car but the car moves forawrd for a split second.
doughboy7 is offline  
Old 02/09/2009, 12:03 PM   #9
lavamike
Huge Clucker
 
lavamike's Avatar
 
Join Date: Mar 2008
Posts: 400
Reputation: 2
Default Re: Bugs

Quote:
Originally Posted by Kye
Quote:
  • StartRecordingPlayerData can save files anywhere (..\..\test)
That is a legit problem bug that needs to be fixed. Thanks for reporting.
Wouldn't it be more practical for NPC's to be able to be recorded ingame, then activated without any outside work?
lavamike is offline  
Old 02/09/2009, 01:24 PM   #10
bogeymanEST
Huge Clucker
 
Join Date: Sep 2007
Posts: 229
Reputation: 2
Default Re: Bugs

Spawning a train and then spawning another vehicle next to it deletes a part of the train:

Here is the spawned train:


Now I spawned an Infernus next to it(the dark infernus was already there):


It also produces a warning message:
bogeymanEST 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
.tk domains thread (What do you think of them?) NewYorkRP Everything and Nothing 29 22/09/2013 01:39 PM
Biography Thread Andy_McKinley Everything and Nothing 18 03/06/2010 09:18 PM
Banned of my own thread aleancuervo Server Support 8 14/03/2010 05:04 PM
The Pentium Thread WiseGuy Everything and Nothing 7 15/04/2009 12:02 AM


All times are GMT. The time now is 02:02 AM.


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