What's wrong here - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What's wrong here (
/showthread.php?tid=244919)
What's wrong here -
ihatetn931 - 29.03.2011
I know it's prolly somthing simple but i'm having a brainfart at the moment
pawn Код:
if(dialogid == 25)
{
if(!response)
format(str, sizeof (str), "You have deposited %d in your bank account",inputtext);
SendClientMessage(playerid,COLOR_YELLOW,str);
PlayerInfo[playerid][pBank] = inputtext; //line 3139
GivePlayerCash(playerid, -inputtext); //line 3140
}
Код:
C:\Users\Server\Desktop\samp\gamemodes\newslrp.pwn(3139) : error 006: must be assigned to an array
C:\Users\Server\Desktop\samp\gamemodes\newslrp.pwn(3140) : error 033: array must be indexed (variable "inputtext")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: What's wrong here -
Jochemd - 29.03.2011
In stead of using inputtext use 'strval(inputtext)'. Needed since it is a string
Btw, now this code works when the player presses cancel!
Re: What's wrong here -
ihatetn931 - 29.03.2011
Quote:
Originally Posted by Jochemd
In stead of using inputtext use 'strval(inputtext)'. Needed since it is a string
Btw, now this code works when the player presses cancel!
|
Ya, i had return ShowPlayerDialog After !response but i removed it to try somthing.
Thank you for the help tho