prop script error

Started by Shovon^, Sep 11, 2016, 04:09 AM

Previous topic - Next topic

Shovon^

iam having a problem with "kusangis property system" i added all the things in my server script including the function loadprops and then when i launch the server then it shows a error
  ( the index loadprops doesnt exist)
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

KAKAN

Quote from: Shovon^ on Sep 11, 2016, 04:09 AMiam having a problem with "kusangis property system" i added all the things in my server script including the function loadprops and then when i launch the server then it shows a error
  ( the index loadprops doesnt exist)

haha, you didn't add it to your script. Maybe you've added it to some other file and the file is not loaded.
For ex: You've saved it in prop.nut.
Now, this will work:-dofile("prop.nut",true);
loadprops();
But this will not:-
loadprops();
dofile("prop.nut",true);
That's because in the 1st example, the file is loaded and compiled, so, all the functions are registered for it's use.
But, in the 2nd example, the file is loaded after the prop function is called, which was not there before loading the file, so it throws an error.
oh no

Shovon^

ohh got it wait i will try
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Shovon^

:-\ it isn't working plz help
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

MatheuS

Post your LoadProps() function
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Kewun

describe more info screenshot, what are you doing LoadProps() or loadprops()

Shovon^

Ian currently using Kisanganis prop system I added loadprops() function from there ..... And iam on my phone so I can't post the function for now ..
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Kewun

case sensitive, try LoadProps() instead of loadprops()

Shovon^

i tried both, but i may try again later.....
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

KAKAN

You shouldn't be scripting then. Simply, stick to playing.
oh no

Shovon^

:P i wanna script ......and @KAKAN is that function loadprops() really case sensitive??
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

KAKAN

Quote from: Shovon^ on Sep 15, 2016, 02:49 AM@KAKAN is that function loadprops() really case sensitive??
Isn't that a basic thing? Yes, it is. Sorry, but I can't help more.
oh no

Nihongo^

i think you don't have loadprop function
put this
function LoadProps()
{
    try{
 
 if ( CountProps() != 0 )
 {
     local q = QuerySQL( db, "SELECT * FROM Props WHERE rowid LIKE '%'" ), pos;
     while( GetSQLColumnData( q, 0 ) )
     {
        local coords = GetSQLColumnData( q, 4 );
     local pos = split( coords, " " );
     local x = pos[0], y = pos[1], z = pos[2];
     CreatePickup( 407, Vector( x.tofloat(), y.tofloat(), z.tofloat() ) );
     GetSQLNextRow( q );
     }
  FreeSQLQuery(q);
 }   
 
 }
 catch(e) print( "function LoadProps() error: " + e );
}

Shovon^

I have the loadprops() function......
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Kewun

care to show it? a screenshot of it?