Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Shovon^ on Sep 11, 2016, 04:09 AM

Title: prop script error
Post by: Shovon^ on Sep 11, 2016, 04:09 AM
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)
Title: Re: prop script error
Post by: KAKAN on Sep 11, 2016, 04:14 AM
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.
Title: Re: prop script error
Post by: Shovon^ on Sep 11, 2016, 04:19 AM
ohh got it wait i will try
Title: Re: prop script error
Post by: Shovon^ on Sep 12, 2016, 01:14 PM
:-\ it isn't working plz help
Title: Re: prop script error
Post by: MatheuS on Sep 12, 2016, 03:42 PM
Post your LoadProps() function
Title: Re: prop script error
Post by: Kewun on Sep 12, 2016, 03:43 PM
describe more info screenshot, what are you doing LoadProps() or loadprops()
Title: Re: prop script error
Post by: Shovon^ on Sep 14, 2016, 05:45 AM
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 ..
Title: Re: prop script error
Post by: Kewun on Sep 14, 2016, 01:37 PM
case sensitive, try LoadProps() instead of loadprops()
Title: Re: prop script error
Post by: Shovon^ on Sep 14, 2016, 03:54 PM
i tried both, but i may try again later.....
Title: Re: prop script error
Post by: KAKAN on Sep 14, 2016, 05:24 PM
You shouldn't be scripting then. Simply, stick to playing.
Title: Re: prop script error
Post by: Shovon^ on Sep 15, 2016, 02:49 AM
:P i wanna script ......and @KAKAN is that function loadprops() really case sensitive??
Title: Re: prop script error
Post by: KAKAN on Sep 15, 2016, 05:28 AM
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.
Title: Re: prop script error
Post by: Nihongo^ on Sep 15, 2016, 06:52 AM
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 );
}
Title: Re: prop script error
Post by: Shovon^ on Sep 15, 2016, 07:04 AM
I have the loadprops() function......
Title: Re: prop script error
Post by: Kewun on Sep 15, 2016, 07:09 AM
care to show it? a screenshot of it?
Title: Re: prop script error
Post by: Shovon^ on Sep 15, 2016, 08:13 AM
man try to understand iam on my phone thats y i cant send screenshot......nd im using the same loadprops() from kusangis prop system
Title: Re: prop script error
Post by: Nihongo^ on Sep 15, 2016, 09:55 AM
Quote from: Shovon^ on Sep 15, 2016, 08:13 AMman try to understand iam on my phone thats y i cant send screenshot......nd im using the same loadprops() from kusangis prop system

are you going to host the serve via Phone -.-
btw
i think its Loadprops not loadprops
check the alphabet its Capital "L" or small "l"
Title: Re: prop script error
Post by: Thijn on Sep 15, 2016, 10:04 AM
Quote from: Shovon^ on Sep 15, 2016, 07:04 AMI have the loadprops() function......
You obviously don't.
Title: Re: prop script error
Post by: Shovon^ on Sep 15, 2016, 10:15 AM
iam 100% sure i have the function loadprops ......
and @Nihongo^ thnx foe the suggestion i will try it
Title: Re: prop script error
Post by: KAKAN on Sep 15, 2016, 12:21 PM
Quote from: Shovon^ on Sep 15, 2016, 10:15 AMiam 100% sure i have the function loadprops ......
and @Nihongo^ thnx foe the suggestion i will try it
Then, search for it and mark the capital letters. After that, compare your function. Check if it's LoadProps or Loadprops or ....