SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 26/05/2019, 04:30 AM   #1
akib
Huge Clucker
 
akib's Avatar
 
Join Date: Jun 2016
Location: Bangladesh
Posts: 278
Reputation: 2
Default strval error

PHP Code:
CMD:movegate(playerid,params[]){
    new 
id Closest_Gate(playerid,6);
    if(
id==-1) return 1;
    if(
DynamicGate[id][door_pass]) Dialog_Show(playerid"OnGatePassResponse"DIALOG_STYLE_INPUT"Password Protected""This gate is password protected\nPlease Enter password to continue.\n\n\n""Open""Cancel");
    return 
1;

PHP Code:
Dialog:OnGatePassResponse(playerid,response,inputtext[]){
    if(
response){
        new 
id=Closest_Gate(playerid);
        
printf("%i"strval(inputtext));
        if(
DynamicGate[id][door_pass]==strval(inputtext)){
            
MoveGate(id);
        }else{
            
Dialog_Show(playerid"OnGatePassResponse"DIALOG_STYLE_INPUT"Password Protected""You've entered an incorrect password.\nPlease Enter password correctly in order to continue.\n\n\n""Open""Close");
        }
    }
    return 
1;

my server get crashed when ever I type the password in input box.
__________________
ImKhan#4244
akib is offline   Reply With Quote
Old 26/05/2019, 10:11 AM   #2
TheToretto
Gangsta
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 585
Reputation: 66
Default Re: strval error

pawn Code:
Dialog_Show(playerid, "OnGatePassResponse", DIALOG_STYLE_INPUT, "Password Protected", "You've entered an incorrect password.\nPlease Enter password correctly in order to continue.\n\n\n", "Open", "Close");

Since when do you call functions directly using Dialog_Show or ShowPlayerDialog ?

Use mysql_tquery if you're using MySQL, you need a query by the way.
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto 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 028: invalid subscript (not an array or too many subscripts): "strval" ShawnMiller1337 Scripting Help 0 02/10/2012 05:49 AM
strval SnG.Scot_MisCuDI Scripting Help 6 07/07/2012 10:05 PM
[BUG] Strval wups Help Archive 4 26/12/2010 11:13 AM
strval + tmp.. rbN. Help Archive 1 25/09/2010 05:08 PM
[FIXED]Strval getting error? DarrenReeder Help Archive 0 18/04/2010 03:24 PM


All times are GMT. The time now is 06:43 AM.


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