SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 02/01/2018, 04:22 PM   #1
Imbalo
Big Clucker
 
Join Date: Mar 2017
Location: Indonesia
Posts: 66
Reputation: 0
Default Error

the code is :
INI_WriteString(File,"Name",GetPlayerName(playerid , playername, sizeof(playername)));

i got this error:
C:\Users\10\Desktop\mamamssvf\gamemodes\test.pwn(1 32) : error 035: argument type mismatch (argument 3)

can you help me ?
Imbalo is offline   Reply With Quote
Old 02/01/2018, 04:26 PM   #2
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: Error

That's not how getplayername works,
replace with this and notice the difference.
PHP Code:
GetPlayerName(playerid playernamesizeof(playername));
INI_WriteString(File,"Name",playername); 
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 02/01/2018, 04:29 PM   #3
Imbalo
Big Clucker
 
Join Date: Mar 2017
Location: Indonesia
Posts: 66
Reputation: 0
Default Re: Error

it works.
Imbalo is offline   Reply With Quote
Old 02/01/2018, 04:31 PM   #4
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: Error

Quote:
Originally Posted by Imbalo View Post
it works.
Yeah next time when you use getplayername declare the variable then save the player's name in that variable through getplayername then use that variable in the functions you're scripting don't use the actual getplayername function into another function.
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Reply

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
error 017: undefined symbol,fatal error 107: too many error messages on one line Slicebook Scripting Help 11 04/05/2014 08:30 PM
An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds.... rati555 Scripting Help 1 14/09/2012 07:45 PM
Registered plate stock error 'error 076: syntax error in the expression, or invalid function call' Deal-or-die Scripting Help 2 25/06/2012 03:12 PM
Error message: : error 030: compound statement not closed at the end of file (started at line 170) the_zohan Scripting Help 5 04/06/2012 08:38 AM
I get tagmismatch error, But i cant find any error error Swiftz Help Archive 1 16/04/2011 04:31 AM


All times are GMT. The time now is 03:57 PM.


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