3 strings in a dialog = Warning
#1

Hi!


I recently scripted a bit with strings in a dialog..

But I get some warnings:

Код:
D:\Davids\Scripting\Server Las Venturas TDM mix\LV.pwn(2517) : warning 202: number of arguments does not match definition
D:\Davids\Scripting\Server Las Venturas TDM mix\LV.pwn(2517) : warning 202: number of arguments does not match definition
D:\Davids\Scripting\Server Las Venturas TDM mix\LV.pwn(2517) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Here's the code:

pawn Код:
format(stringScore, sizeof(stringScore), "Your score is: %i",GetPlayerScore(playerid));
format(stringMoney, sizeof(stringMoney), "Money: %i",GetPlayerMoney(playerid));
format(stringWanted, sizeof(stringWanted), "Wanted level: %i", GetPlayerWantedLevel(playerid));
               
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats","test",stringScore,stringMoney,stringWanted, "Ok", "");
Doesn't it work to have 3 strings in a dialog or?...
Reply
#2

Warnings dosent usually do anything to your script if you dont have like 100 of them but it will work
Reply
#3

pawn Код:
new usageString[128];
format(usageString, sizeof(usageString), "Your score is: %i\nMoney: %i\nWanted level: %i", GetPlayerScore(playerid), GetPlayerMoney(playerid), GetPlayerWantedLevel(playerid));
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats", usageString, "OK", "");
The problem is, you can't add params that are not defined inside the native.
You can't use ShowPlayerDialog as a in-built format.
You need to format it first, the whole string. And then print it out towards the ShowPlayerDialog.

ShowPlayerDialog native
format native
Reply
#4

Thanks a lot guys I will try if it will work, recently started to work with stings didn't learn it when I were a beginner.

KaliKs @ Yeah I know but I thought it were better to fix it to fully.
But thanks! .
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)