Raised This Month: $32 Target: $400
 8% 

Formatting bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-13-2015 , 09:53   Formatting bug
Reply With Quote #1

Hello everyone!,

I made a function that I can attach trails.

So my problem is that I can attach specific trail from specific file.

My precache:
PHP Code:
FormatEx(tempstringsizeof(tempstring), "materials/sprites/%s"s_filename);
PrecacheModel(tempstringtrue); 
My attach:
PHP Code:
FormatEx(tempstringsizeof(tempstring), "materials/sprites/%s.vmt"s_filename);
Trail_Attach(clienttempstring); 
If I do for example:
PHP Code:
FormatEx(tempstringsizeof(tempstring), "materials/sprites/airforce.vmt"s_filename);
PrecacheModel(tempstringtrue); 
and
PHP Code:
FormatEx(tempstringsizeof(tempstring), "materials/sprites/airforce.vmt"s_filename);
Trail_Attach(clienttempstring); 
Works, but if I do

PHP Code:
FormatEx(tempstringsizeof(tempstring), "materials/sprites/%s"s_filename);
PrecacheModel(tempstringtrue); 
and
PHP Code:
FormatEx(tempstringsizeof(tempstring), "materials/sprites/%s.vmt"s_filename);
Trail_Attach(clienttempstring); 
It doesn't, Can I help please ?
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-13-2015 , 09:55   Re: Formatting bug
Reply With Quote #2

insert this above the format line:
PHP Code:
PrintToServer(s_filename); 
If it's a blank string or garbage string, then the problem relies in the variable not being set.
__________________
WildCard65 is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-13-2015 , 10:00   Re: Formatting bug
Reply With Quote #3

Quote:
Originally Posted by WildCard65 View Post
insert this above the format line:
PHP Code:
PrintToServer(s_filename); 
If it's a blank string or garbage string, then the problem relies in the variable not being set.
Okay, thank you, more one said me it on private chat lemme try.

EDIT: Yeah, it print the place but not file name it prints PLACE/.vmt...
Tried a lot to fix no idea why no .
__________________
SourcePawn, C# and C++ Programmer.

My plugin list

Last edited by TheUnderTaker; 08-13-2015 at 10:07.
TheUnderTaker is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-13-2015 , 10:40   Re: Formatting bug
Reply With Quote #4

What's the code that sets s_filename?
__________________
WildCard65 is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-13-2015 , 10:41   Re: Formatting bug
Reply With Quote #5

Quote:
Originally Posted by WildCard65 View Post
What's the code that sets s_filename?
char s_filename[128]; but in the code I stored it I guess(In the format).
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-13-2015 , 20:53   Re: Formatting bug
Reply With Quote #6

Someone can help?
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 08-14-2015 , 02:26   Re: Formatting bug
Reply With Quote #7

U need to define it duh?
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
SoulSharD
Member
Join Date: Oct 2013
Location: United Kingdom
Old 08-14-2015 , 07:06   Re: Formatting bug
Reply With Quote #8

Like Michal said, how exactly are you defining s_filename?
Did you declare it, but never actually did anything with it?

It would explain why it's printing an empty string.
__________________

SoulSharD is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-14-2015 , 09:31   Re: Formatting bug
Reply With Quote #9

Quote:
Originally Posted by SoulSharD View Post
Like Michal said, how exactly are you defining s_filename?
Did you declare it, but never actually did anything with it?

It would explain why it's printing an empty string.
I know, But I said it declared on FormatEx function, and no idea why it doesn't work for me,
Just on print it didn't declare and I can see it but I don't care about print, just want perform the trail and please help instead talk.
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 08-14-2015 , 09:44   Re: Formatting bug
Reply With Quote #10

Can you show us your code?
KissLick 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:02.


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