Car-House system problem
#1

Hello,

I work on my own Car-House system.
but i have a problem, and I dont know, what I do wrong.(sry for my english),
//edit 2
I dont know, what I write in "response".

Mistake-Code
PHP код:
Line (121): Unknown variable"response" 
Code where is the error
PHP код:
//DIALOG_DEFINE
#define DIALOG_CARHOUSEBUY 0
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_DRIVER)
    {
    for(new 
0i<sizeof(grotticars);i++)
    {
    if(
GetPlayerVehicleID(playerid) == grotticars[i])
    {
        
OnDialogResponse(playeridCARHOUSEBUYresponselistiteminputtext[]) //somewhere there must be error //
    
}
    else
    {
    }
    }
    }
    return 
1;

Help is cool!


//Edit 3 Clock: 14:49
New error...
Car-system works, but little warning :O

PHP код:
Line (341): The number of parameters are incorrect 
Code:
PHP код:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    for(new 
0sizeof(grotticars); i++)
    {
    if(
OnPlayerEnterVehicle(playeridvehicleid) == grotticars[i])//here is the error, but I dont can find him :o
    
{
        
TogglePlayerControllable(playeridtrue);
    }
    else
    {
    }
    } 
This code is much longer, I took only that with the Carhouse-system, where is the error, if you want more code, iґll copy that from my gammode )
Reply
#2

insted of useing there dialogid keep a real id like
pawn Код:
#define DIALOG_HOUSE 0
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i = 0; i<sizeof(grotticars);i++)
    {
    if(GetPlayerVehicleID(playerid) == grotticars[i])
    {
        OnDialogResponse(playerid,DIALOG_HOUSE, response, listitem, inputtext[]) //somewhere there must be error
    }
    else
    {
    }
    }
    }
    return 1;
}
Reply
#3

Ouuuh, Iґm sorry
My mistake Thx !!!
Reply
#4

new error..
Iґm sorry..
PHP код:
Line (121): Unknown variable "response" 
Reply
#5

https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#6

Finish Thx for help!
Reply
#7

deleted, new error is on the top
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)