#1

Hey SA-MP.com, I want to finish my GM but i have a problem on this linie:
pawn Код:
new height = strval( playerid, params[ ] );
And the error is:
pawn Код:
error 035: argument type mismatch (argument 1)
What's wrong?
Reply
#2

the input for strval is just a string. not a playerid
Reply
#3

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
the input for strval is just a string. not a playerid
Thx it works, can i post next error, in this reply?
Reply
#4

Shouldn't that be:
pawn Код:
new height = strval(params);
Edit: Too late
Reply
#5

Ok, i will post all my errors in my GM:
Linie 16751
pawn Код:
GMCountDown( );
Linie 17858
pawn Код:
C_DATA[ housenumber ][ NewCar ] = 1;
Linia 19168
pawn Код:
if ( !strlen( playerid, params[ ] ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/getinfo [playerid]" );
Linie 19170
pawn Код:
player1 = strval( playerid, params[ ] );
Linie 19317
pawn Код:
if ( CountDown == -1 )
Linia 19319
pawn Код:
CountDown = 6;
Linie 19945
pawn Код:
FormatMSG( playerid, COLOR_ABLUE, "\"%s\" (id %d) Average Ping: %d   (Last ping readings: %d, %d, %d, %d)", PlayerName2( Player ), Player, Average, PlayerInfo[ Player ][ pPing ][ 0 ], PlayerInfo[ Player ][ pPing ][ 1 ], PlayerInfo[ Player ][ pPing ][ 2 ], PlayerInfo[ Player ][ pPing ][ 3 ] );
Linia 19996
pawn Код:
new Float:Gravity = floatstr( playerid, params[ ] ), string[ 128 ];
Linie 21119
pawn Код:
if ( !strlen( playerid, params[ ] ) )
Linie 21134
pawn Код:
Player = strval( playerid, params[ ] );
Linia 22948
pawn Код:
if ( strlen( playerid, params[ ] ) == 0 ) return SendClientMessage( playerid, COLOR_ULTRARED, "ACCOUNT: {FFFFFF}Correct usage: '{E60000}/register [password]{FFFFFF}'" );
Linie 22949
pawn Код:
if ( strlen( playerid, params[ ] ) < 6 || strlen( playerid, params[ ] ) > 24 ) return SendClientMessage( playerid, COLOR_ULTRARED, "ACCOUNT: {FFFFFF}Password length must be greater than {E60000}6 {FFFFFF}characters!" );
Linia 22988
pawn Код:
if ( strlen( playerid, params[ ] ) == 0 ) return SendClientMessage( playerid, COLOR_ULTRARED, "ACCOUNT: {FFFFFF}Correct usage: '{E60000}/login [Password]{FFFFFF}'" );
Linia 23068
pawn Код:
pColor = GetPlayerColor( playerid );
Linie 23464
pawn Код:
if ( sscanf( params, "i", Colour ) ) return SendClientMessage( playerid, "/mycolor [Color]", "0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" );
Errors

Linie 16751-> error 012: invalid function call, not a valid address and error 029: invalid expression, assumed zero
Linie 17858-> error 032: array index out of bounds (variable "C_DATA")
Linie 19168-> error 035: argument type mismatch (argument 1)
Linie 19170-> error 035: argument type mismatch (argument 1)
Linie 19317-> error 076: syntax error in the expression, or invalid function call
Linie 19319-> error 076: syntax error in the expression, or invalid function call
Linie 19945-> error 032: array index out of bounds (variable "PlayerInfo")
Linie 19996-> error 035: argument type mismatch (argument 1)
Linie 21119-> error 035: argument type mismatch (argument 1)
Linie 21134-> error 035: argument type mismatch (argument 1)
Linie 22948-> error 035: argument type mismatch (argument 1)
Linie 22949-> error 035: argument type mismatch (argument 1)
Linie 22988-> error 035: argument type mismatch (argument 1)
Linie 23068-> error 022: must be lvalue (non-constant)
Linie 23464-> error 035: argument type mismatch (argument 2)
Reply
#6

Every strlen(playerid,params) should be strlen(params)
Reply
#7

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
Every strlen(playerid,params) should be strlen(params)
Ok, i have fixed all strelns, and from 17 errors, now i have 9, thx:
Error on 16752
pawn Код:
GMCountDown( );
On 17859
pawn Код:
C_DATA[ housenumber ][ NewCar ] = 1;
On 19318
pawn Код:
if ( CountDown == -1 )
On 19320
pawn Код:
CountDown = 6;
On 19946
pawn Код:
FormatMSG( playerid, COLOR_ABLUE, "\"%s\" (id %d) Average Ping: %d   (Last ping readings: %d, %d, %d, %d)", PlayerName2( Player ), Player, Average, PlayerInfo[ Player ][ pPing ][ 0 ], PlayerInfo[ Player ][ pPing ][ 1 ], PlayerInfo[ Player ][ pPing ][ 2 ], PlayerInfo[ Player ][ pPing ][ 3 ] );
On 22950
pawn Код:
if ( strlen(params) < 6 || strlen( playerid, params[ ] ) > 24 ) return SendClientMessage( playerid, COLOR_ULTRARED, "ACCOUNT: {FFFFFF}Password length must be greater than {E60000}6 {FFFFFF}characters!" );
On 23069
pawn Код:
pColor = GetPlayerColor( playerid );
On 23465
pawn Код:
if ( sscanf( params, "i", Colour ) ) return SendClientMessage( playerid, "/mycolor [Color]", "0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" );
ERRORS
Error on 16752> error 012: invalid function call, not a valid address AND error 029: invalid expression, assumed zero
On 17859> error 032: array index out of bounds (variable "C_DATA")
On 19318> error 076: syntax error in the expression, or invalid function call
On 19320> error 076: syntax error in the expression, or invalid function call
On 19946> error 032: array index out of bounds (variable "PlayerInfo")
On 22950> error 035: argument type mismatch (argument 1)
On 23069> error 022: must be lvalue (non-constant)
On 23465> error 035: argument type mismatch (argument 2)
Reply
#8

Remove the red words in line 22950 and the [ ]
Код:
if ( strlen(params) < 6 || strlen( playerid, params[ ] ) > 24 ) return SendClientMessage( playerid, COLOR_ULTRARED, "ACCOUNT: {FFFFFF}Password length must be greater than {E60000}6 {FFFFFF}characters!" );
Others will take some time...
Reply
#9

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
Remove the red words in line 22950 and the [ ]
Код:
if ( strlen(params) < 6 || strlen( playerid, params[ ] ) > 24 ) return SendClientMessage( playerid, COLOR_ULTRARED, "ACCOUNT: {FFFFFF}Password length must be greater than {E60000}6 {FFFFFF}characters!" );
Others will take some time...
Thx you
Reply
#10

Код:
if ( sscanf( params, "i", Colour ) ) return SendClientMessage( playerid, "/mycolor [Color]") &&  SendClientMessage( playerid, "0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" );
Last line...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)