Raised This Month: $ Target: $400
 0% 

Include error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 04-17-2011 , 15:35   Include error
Reply With Quote #1

Can someone help me with this include please? I already asked in the topic but I am sure that the author will not respond within the next days.

Inc:

http://forums.alliedmods.net/attachm...9&d=1279216152

Error:

Quote:
L 04/17/2011 - 17:58:13: [AMXX] Run time error 10: native error (native "ArraySize")
L 04/17/2011 - 17:58:13: [AMXX] [0] superspawns.inc::SsGetOrigin (line 52)
L 04/17/2011 - 17:58:13: Invalid array handle provided
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2011 , 16:18   Re: Include error
Reply With Quote #2

And your code is ?
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-17-2011 , 17:03   Re: Include error
Reply With Quote #3

PHP Code:
        new Float:fRandom[3]
        new 
Float:fBelow[3]
        new 
Trace_Result
        
        
while(SsGetOrigin(fRandom))
        {
            
xs_vec_copy(fRandomfBelow)
            
fBelow[2] -= 100.0 // i believe the height of a player is 27, let me know if i'm mistaken
            
engfunc(EngFunc_TraceLinefRandomfBelowIGNORE_MONSTERS0Trace_Result)
            
            if(
get_tr2(Trace_ResultTR_pHit) == 0// want it so you spawn above a floor
            
{
                
set_pev(idpev_originfRandom)
                
                break
            }
        } 
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2011 , 17:20   Re: Include error
Reply With Quote #4

I was right, this error could be only because Arrays were not created.
You seem having problem to read stuffs because all is well written clearly you have to call SsInit() before.
Quote:
// First we have to initialize the arrays and parameters
// The value 3500.0 is the minimum distance between points
// Nearest points will be found, but GetOrigin will erase points
// with less than 3500.0 distance with other used points and return
SsInit(3500.0)
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-17-2011 , 17:28   Re: Include error
Reply With Quote #5

http://forums.alliedmods.net/showthr...ht=SsGetOrigin
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2011 , 17:36   Re: Include error
Reply With Quote #6

At the end, it's the same, you have not tried to understand, nor to read the tutorial to see if the code was missing something.
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-17-2011 , 17:40   Re: Include error
Reply With Quote #7

Well still it doesn't teleport me to a random spawnpoint. No errors this time. It does teleport it specific to the standard spawnpoints.
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2011 , 17:45   Re: Include error
Reply With Quote #8

Your current plugin is ?
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-18-2011 , 11:42   Re: Include error
Reply With Quote #9

Quote:
Originally Posted by Arkshine View Post
Your current plugin is ?
In init:

PHP Code:
    SsInit(3500.0)
    
SsScan() 
Code still the one from the first post.
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-18-2011 , 14:51   Re: Include error
Reply With Quote #10

Try to use just that, instead of the whole while :

if( SsGetOrigin( fRandom ) )
{
engfunc( EngFunc_SetOrigin, id, fRandom );
}
__________________
Arkshine is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 19:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode