CLEO Help How can I make a cmd. like /spawncar (ID is in my .INI) work? It always crashes!)

CLEO related
Status
Not open for further replies.

Supermacy31

Active member
Joined
Mar 13, 2013
Messages
173
Reaction score
0
I just need help on a portion of it because it's the portion that doesn't work.

Code:
0AF0: 0@ = get_int_from_ini_file "cleo\car.ini" section "models" key "id0" 
0AF9: samp say_msg "/spawncar " 0@

I need help quickly and this seems to be very easily fixed. Anyone have an idea? I'm not very good at string manipulation right now ;3

If I have that snippet, it crashes on typed.

I suspect it's this that's making it crash:

"[font=Monaco, Consolas, Courier, monospace]0AF9: samp say_msg "/spawncar[/font][font=Monaco, Consolas, Courier, monospace] " 0@"[/font]

[font=Monaco, Consolas, Courier, monospace]How to fix?[/font]
 

Supermacy31

Active member
Joined
Mar 13, 2013
Messages
173
Reaction score
0
monday said:
0AF9: samp say_msg "/spawncar %d" 0@
Hmm... 

It doesn't seem to work? What does %d do?

Here's what I have for my snippet:

Code:
SAMP.IsCommandTyped(0@)
0AF9: samp say_msg "/help"
0AF0: 1@ = get_int_from_ini_file "cleo\car.ini" section "models" key "id0" 
0AF9: samp say_msg "f %d" 1@
SAMP.CmdRet

I did that as a test and this is what it outputs:

The /help cmd. goes through.
Then instead of saying the id. of the model, I say this:
F D
which completely ignores the id and not type it? Why's this?
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
oh sorry, say comand doesn't allow string formatting,
0AD3: 6@v = format "/f %d" 1@
0AF9: samp say_msg 6@v
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
It does, his sanny builder settings are bad.

springfield said:
This is a sanny builder problem/feature.
In Sanny Builder, press F10 or from the task bar go to Tools -> Options . Select 'Format' tab, in the lower right corner -> 'Case Converting', check 'As is' and recompile your mod.
 

Supermacy31

Active member
Joined
Mar 13, 2013
Messages
173
Reaction score
0
springfield said:
It does, his sanny builder settings are bad.

springfield said:
This is a sanny builder problem/feature.
In Sanny Builder, press F10 or from the task bar go to Tools -> Options . Select 'Format' tab, in the lower right corner -> 'Case Converting', check 'As is' and recompile your mod.
Wow, it worked!

It was the AS IS thing which has been bugging my GTA_SA. Oh man.

What a simple thing. Thanks man, thanks you guys!

=)
 
Status
Not open for further replies.
Top